我在VB的COM中使用了ADODC的控件连接数据库,在VC下调用的时候,发现,要是用F5go的方式运行程序显示VB的窗口就会出错但是用execute的方式就没有问题好奇怪哦
下面是我VC中的代码IPointDataOperation hehe;

::CoInitialize( NULL); hehe.CreateDispatch( "PointData.PointDataOperation");
CComBSTR haha = L"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hehe;Data Source=USER"; hehe.SetCurrenQuestionID("1");
hehe.SetStudentID("01");
hehe.SetTeacherID("00");
short x, y;
x = 0; 
y = 0; hehe.showPoint( &haha.m_str, &x, &y);