I&#039m having a recurring problem with a COM object that I&#039ve written for use in an ASP page. <BR><BR>Here&#039s a quick history of the Object:<BR><BR>Using VC++ 6, I used the ATL COM wizard to create my project. From there, I inserted a new ATL object, specifically the ActiveX Server Component.<BR>I specified the following options for the component: <BR>Threading Model: BOTH<BR>Aggregation: YES<BR>FreeThreaded Marshaller: YES<BR>OnStartPage/OnEndPage: NO<BR><BR>then, i wrote a simple method that executes a query against a database using ADO (function follows)<BR><BR><BR><BR>STDMETHODIMP CSQL::PerformSQL(BSTR bstr, BSTR *pbStrRetVal){<BR> AFX_MANAGE_STATE(AfxGetStaticModuleState())<BR> // TODO: Add your implementation code here<BR> CString m_dbStatus = "1";<BR> CString m_symbolList = "::";<BR> <BR> <BR> // Create a temporary CComBSTR <BR> CComBSTR bstrTemp((LPCSTR)""); <BR> if (!bstrTemp) <BR> return E_OUTOFMEMORY;<BR> variant_t vtRecordValue;<BR> // TODO: Add your dispatch handler code here<BR> try<BR> {<BR> <BR> CoInitialize(NULL); <BR> HRESULT hr;<BR> _RecordsetPtr pRecordset(__uuidof(Recordset));<BR> _ConnectionPtr pConnection(__uuidof(Connection));<BR> pRecordset-&#062;CursorLocation = adUseClient;<BR> pRecordset-&#062;CursorType = adOpenKeyset;<BR> pRecordset-&#062;LockType = adLockOptimistic;<BR> hr = pConnection-&#062;Open("dsn=MYDATASOURCE;","JOEUSER","",NULL); <BR> hr = pRecordset-&#062;Open("Select TOP 4000 Names from DBTable ORDER by Names DESC",_variant_t((IDispatch *)pConnection,true),adOpenForwardOnly,adLockReadOn ly,adCmdText);<BR> while ( !pRecordset-&#062;adoEOF ) <BR> <BR> {<BR> <BR> vtRecordValue = pRecordset-&#062;Fields-&#062;GetItem("Symbol")-&#062;Value;<BR> m_symbolList = "" + m_symbolList + "," + (char*) ((_bstr_t) vtRecordValue);<BR> pRecordset-&#062;MoveNext();<BR> <BR> }<BR> <BR> pRecordset-&#062;Close();<BR> pConnection-&#062;Close();<BR> CoUninitialize();<BR> }<BR> catch( CException *e )<BR> {<BR> <BR> m_dbStatus = "2";<BR> }<BR> catch( _com_error &e )<BR> {<BR> <BR> m_dbStatus = "3";<BR> }<BR> catch(...)<BR> {<BR> <BR> m_dbStatus = "9";<BR> }<BR> <BR> bstrTemp.Append((LPCSTR)m_symbolList);<BR> *pbStrRetVal = bstrTemp.Detach();<BR> return S_OK;<BR> <BR>}<BR><BR>i then built the DLL and registered it. <BR><BR>I then attempted to run the object like this:<BR><BR>&#060;%<BR><BR>dim str, names, obj<BR>Set obj = Server.CreateObject("TESTTHREADING.SQL")<BR>str = "Select"<BR>names = obj.PerformSQL(str)<BR>Response.Write "Names: " & names<BR>Set obj = nothing <BR><BR>%&#062;<BR><BR>Now... it works... provided there is only ONE concurrent request! But, i want to assume that there will be more than one user on my site at any given time, so i wanted to make sure the object could run two instances simultaneously.<BR><BR>but, i can&#039t!!<BR><BR>the response i get from the webserver is this (when i try to run the second request)<BR><BR>" The requested resource is in use. "<BR><BR>and that&#039s it!<BR><BR>Can anyone shed some light on this for me?? Am i doing something wrong?? or is there one BIG limitation in COM and ASP??<BR><BR>--<BR>if anyone wants my source, I&#039d be happy to provide it.<BR><BR>