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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error in connection string

Status
Not open for further replies.

rjkealey

Programmer
Feb 14, 2003
84
US
Does anybody see anyhing wrong with this code?
I uploaded the files to server and keep getting error

<%
dim ConnectionString
dim MyConn
dim RS


'set connection string to local variable-I use a DSN-less connection
'ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:/home/default/cmkinc.biz/htdocs/auto/foreclosure.mdb&quot;

ConnectionString= &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\home\default\cmkinc.biz\htdocs\auto\foreclosure.mdb&quot;

'ConnectionString=&quot;Driver={Microsoft Access Driver (*.mdb)}; DBQ=\e:\home\default\cmkinc.biz\htdocs\auto\foreclosure.mdb&quot;

Set MyConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
Set RS=Server.CreateObject(&quot;ADODB.RecordSet&quot;)



*******Error Points Here***********************
MyConn.open ConnectionString
%>

Microsoft JET Database Engine error '80004005'

Unspecified error

/auto/databaseconnect.asp, line 21

This works great on localhost but when I upload it to hosting server gets error connecdting?
I have tried several different ways to connect still no luck

RJKealey
 
cahnge this
Driver={Microsoft Access Driver (*.mdb)};
to
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=
_________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
onpnt2.gif
 
I have tried that and several others typed differently
still no luck

RJKealey
 
hmm... I guess that explains it up there. [lol]

try server.mapPath instead of the hard coded path. this will take out a possible error in there

eg:
DBQ=&quot; & server.mapPath(&quot;\htdocs\auto\foreclosure.mdb&quot;) _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
onpnt2.gif
 
still no dice could it be a server error?
RJKealey
 
Try the following:

strConn = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; & Server.MapPath(&quot;/home/default/cmkinc.biz/htdocs/auto/foreclosure.mdb&quot;) & &quot;;&quot; _______________________________
regards,
Brian

AOL IM: FreelanceGaines

AG00280_.gif
 
keeps giving error on MyConn.open ConnectionString
can not figure this out
RJKealey
 
Go to and type in &quot;Microsoft JET Database Engine error '80004005'&quot; in the search box.

I saw a bunch of links that reference this error. You might want to check them out. _______________________________
regards,
Brian

AOL IM: FreelanceGaines

AG00280_.gif
 
rjkealey,

I have some hits for you to trace,

1. Are you sure the hosting server supports the provider you specificed?

2. What is the physical path of the mdb file you stored in hosting server?
At localhost you stored to
d:\home\default\cmkinc.biz\htdocs\auto\foreclosure.mdb
How about hosting? Is it same path? If not, you need to change the path that same as hosting but not localhost.


Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top