spCON.CreateInstance(__uuidof(Connection));
spRS.CreateInstance(__uuidof(Recordset));
spCON->Open(L"driver={sqlserver};SERVER=mindserver;Database=Testing;","","",-1);
spRS->PutRefActiveConnection( spCON );
spRS->Open("select * from testing", vtMissing, adOpenKeyset,adLockBatchOptimistic, -1);
*retval = _bstr_t(spRS->Fields->Item[0L]->Value).operator wchar_t *();
spRS->Close();
spCON->Close();
As far as i can tell the error occurs at the spCON->Open(stuff) line.
If some1 could please tell me why this isnt working i would be extremely glad.
Thanx
Edited by - newdeal on 6/25/00 9:40:29 AM
COM ATL fun :)
Hiya
Im trying to create an ADO connection from a COM ATL class.
Ive tried the code in a normal exe and im not getting any problems at all. When i use the code in my COM ATL class it works fine when i test it locally with personal web server, however, when i install the object on IIS and try to call the object from an asp site i get the following error.
A trappable error occurred in an external object. The script cannot continue running. (HHMPH)
The code im using is:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement