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

Connection to Database problem

Status
Not open for further replies.

ev14n

Programmer
Jan 9, 2002
9
SG
Hi,

I have a problem when testing my web, logging in.

The error messages shown is:
unspecified error
line 30

Which is should be found around here:
ConnStr="DRIVER={Microsoft Access Driver (*.mdb)}"
ConnStr=Connstr & "DBQ=" & Server.MapPath ("db\password.mdb")
MyCon.Open (ConnStr)

Anyone know what the error is?

Thanks in advance,
-EvIaN-
 
Try leaving out the parenthesis around ConnStr.

i.e.

MyCon.Open ConnStr Mise Le Meas,

Mighty :)
 
Nope.. i don't think it works...:)
Thanks anyway..:)
-EvIaN-
 
Hi ,
Try this and let me know
set db=Server.CreateObject("ADODB.Connection")
db.ConnectionString="DBQ=c:\test\itpdb.mdb;Driver=Microsoft Access Driver (*.mdb)"
db.open
 
You are missing a emi-colon in your connection string. Try the following:

Dim MyCon
set MyCon = Server.CreateObject("ADODB.Connection")
ConnStr="DRIVER={Microsoft Access Driver (*.mdb)}; "
ConnStr=Connstr & "DBQ=" & Server.MapPath ("db\password.mdb")
MyCon.Open ConnStr

Mise Le Meas,

Mighty :)
 
Sorry I forgot somthing.. I'm using Windows 2000, does it make any difference?
 
ok do the following


1.. make sure the actual database, has authorisation for IUSER(blahblahblah) to write to, this is normally what happens to me, do this by going to the actual database, using my computer, and right click, choose security, and make sure the option for the above user is their and set for read & write permissions... if not add it from the database...
2.. use the following code

<%
dim con
Set con = server.Createobject( &quot;ADODB.Connection&quot; )
Con.Open( &quot;DRIVER={Microsoft Access driver (*.mdb)}; DBQ=&quot; & server.MapPath(&quot;db\password.mdb&quot; ) )
%>
place your page here
<%
con.close
set con = nothing
%>

changing Con to the coding you want

3.. Hopefully that will solve the problem, if not contact me i will help all i can
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top