<br>Well the program is certainly smaller! (about a tenth of its previous size: now 133K).<br><br>However, once again it works locally but not on the server I want to run it in. I received errors indicating that the program couldn't find "Mfc42D.dll" and "Msvcrtd.dll". So I copied those into the system32 directory on the server. I tried to register them but got an error "Mfc42D.dll was loaded, but the DllRegisterServer entry point was not found."<br>Anyways, now when I try to run this program on that server it no longer gives me a memory error but instead an ADO error "-2147467262 No Such interface supported".<br><br>One source of the problem is probably that I am building this on a windows98 machine and trying to run it on NT.<br><br>Even the most basic remarks appreciated. The only experience I have with c++ are simple commandline programs. Interacting with ActiveX and windows is daunting to me.<br><br>Here's a simple version of the program<br>------------------------------------<br>#include <stdio.h><br>#include <afxdisp.h><br>#import "c:\program files\common files\system\ado\msado15.dll" rename ("EOF","adoEOF"

no_namespace<br>#define CREATEiNSTANCE(sp,riid) { HRESULT _hr =sp .CreateInstance( __uuidof( riid ) ); \<br> if (FAILED(_hr)) _com_issue_error(_hr); }<br>#define RsITEM(rs,x) rs->Fields->Item[_variant_t(x)]->Value<br><br>struct InitOle <br> {<br> InitOle() { ::CoInitialize(NULL); }<br> ~InitOle() { ::CoUninitialize(); }<br> } _init_InitOle_; // Global Instance to force load/unload of OLE<br><br>void main()<br> {<br> _RecordsetPtr spRS;<br> _ConnectionPtr spCON;<br> CString strTmp;<br>try{<br> CREATEiNSTANCE(spCON,Connection);<br> spCON->ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=test.MDB;DefaultDir=D:\databases\;}";<br> spCON->Open( "test", "", "", -1 );<br> CREATEiNSTANCE(spRS,Recordset)<br> spRS->PutRefActiveConnection( spCON );<br> spRS->Open("SELECT * FROM cart", vtMissing, adOpenKeyset, adLockBatchOptimistic, -1);<br> while(spRS->adoEOF == false)<br> {<br> printf("\n"

;<br> printf((char*) _bstr_t(RsITEM(spRS,"dts"

));<br> spRS->MoveNext();<br> }<br> spRS->Close();<br> spCON->Close();<br> }<br> catch( _com_error &e) {...}<br> }<br> }<br>#undef UC<br> <p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br>