• Advertisement

Archived

This topic is now archived and is closed to further replies.

COM ATL fun :)

This topic is 6454 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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: 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

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement