Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't connect to my access db. can you help me? 3

Status
Not open for further replies.

qb828

Programmer
Sep 27, 2000
98
US
<%
'option explicit
Response.Write(&quot;<h4>Agent Database</h4>&quot;)
dim oCon
dim oRS
dim sSql
Set oCon = Server.CreateObject(&quot;ADODB.Connection&quot;)
oCon.Connectionstring = &quot;Driver={Microsoft Access Driver (*.mdb)}; DBQ=c:\mydb\agentdb.mdb&quot;
oCon.Open
Set oRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
sSql=&quot;SELECT * FROM TblPathogen&quot;
oRS.Open sSql, oCon
%>
This code worked fine at my home PC.
I had saved the agentdb.mdb at same place at home and work.
C:\mydb\agentdb.mdb.

I was able to connect at home but i am having problems at my work.
I get this message. Can you help?? For some reason I am not able to connect.
Thanks.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xc34 Thread 0xf2c DBC 0x1fd1284 Jet'.
/agent/agent3.asp, line 17




QB
 
try the link in this thread a few replies down
thread333-696804

you should use OLEDB connection strings

_____________________________________________________________________
onpnt2.gif

I have the resolution perfect in my mind, but it never seems to fit on the screen quite the same way
 
I get this message now.
Error Type:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.
/agent/agent3.asp, line 17


QB
 
i do have that already...
I get the same error message.
Error Type:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.
/agent/agent3.asp, line 17

This shouldn't be that hard. I don't know why this is not working.
Thanks.


Set oCon = Server.CreateObject(&quot;ADODB.Connection&quot;)
oCon.Connectionstring = &quot;Provider=Mircrosoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\baep\My Documents\Project\AgentDB\agentdb.mdb;&quot;
oCon.Open
Set oRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)

QB
 
Thanks guys.

I had them all already.
MDAC & JET 4.

But I fixed the problem.
I changed the location of my db
from
C:\Documents and Settings\baep\Desktop\Web_ACTD\webpage\mydb.mdb
to
C:\db\mydb.mdb.

After that it worked.

I don't know why!!!!

Can anyone explain that???

Thanks again.


QB
 
Hi,

Just speculating, but it might be because 'Documents and Settings' contains whitespace. I'm not sure how well the web server would handle this?

Cheers

ab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top