PDA

View Full Version : ASP: Coding Help Please!!!


Kevinnaia
03-09-2003, 06:26 PM
I have a code that stores data in a database when users register. I was testing it and got an error saying "Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/register_processor.asp, line 15, column 74
objconn ConnectionString = "Driver = {Microsoft Access Driver (*.mdb)};" &"

<%@ Language=VBScript %>
<%
Dim objConn
Set objConn = Server.Createobject("ADODB.Connection")
objconn ConnectionString = "Driver = {Microsoft Access Driver (*.mdb)};" &
"DBQ=C:\Documents and Settings\Administrator\My Documents\My Webs\CompTech\databases\comptech.mdb
objconn.open

Dim objRS
Set objRS = Server.createobject ("ADODB.Recordset")
objRS.open "CompTech", objconn, , , ADCMDTable

Do While Not objRS.EOF
Response.Write objRS ("Username") & "<br>"
Response.Write objRS ("Password") & "<br>"

objRS.MoveNext

Loop

objRS.Close
Set objRS = Nothing
obj conn.close
set objconn = Nothing
%>
Thank You,
Kevin Naia

entimp
03-09-2003, 11:02 PM
you haven't inserted the name of your database. You also will need to stipulate the path to it as well.

Be very careful about revealing the true name and path of this database... my forum was hacked recently as a result of it being in a generic location.

Kevinnaia
03-10-2003, 04:22 PM
The "Driver" part is what is wrong with it. and I have inserted "DBQ = C:\**********\*&&&**&&*&**&.mdb"
(not the actual location, just hidden for security reasons) the forum wouldn't show it for the same reason when I copied it.

Kevin Naia

entimp
03-10-2003, 10:34 PM
Ok then. What database drivers and platfrom does your server run on? It will make a whole world of difference.

Kevinnaia
03-11-2003, 02:43 PM
WIndows 2000 Server, IIS 5.0, Microsoft Access 2000

MikeParent
03-20-2003, 07:53 PM
Line continuations in VBScript need an &_ at the end (ampersand underscore), not just an & symbol