Ask a Question related to ASP Database, Design and Development.
-
Vincent #1
Error with Records
Hey Aaron,
Your reply says "message unavailable"
I am getting this error:
Microsoft OLE DB Provider for ODBC Drivers
error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement
My code is as follows: What's wrong?
<%@ Language = VBscript%>
<%
'declare variables
Dim FirstName
Dim LastName
Dim Building
Dim RoomNumber
Dim Telephone
Dim Email
Dim Problem
Dim SQLINSERT
Dim connRepairs
Dim URL
' take variables from querystring
FirstName = Request.querystring("FirstName")
LastName = Request.querystring("LastName")
Building = Request.queryString("Building")
RoomNumber = Request.querystring("RoomNumber")
Telephone = Request.querystring("Telephone")
Email = Request.querystring("Email")
Problem = Request.querystring("Problem")
'Create Insert statement for new client
SQLINSERT = "INSERT INTO REPAIRS (FirstName, LastName,
Building, RoomNumber, Telephone, Email, Problem)"
SQLINSERT = SQLINSERT & "VALUES ("
SQLINSERT = SQLINSERT & "'" & FirstName & "',"
SQLINSERT = SQLINSERT & "'" & LastName & "',"
SQLINSERT = SQLINSERT & "'" & Building & "',"
SQLINSERT = SQLINSERT & "'" & RoomNumber & "',"
SQLINSERT = SQLINSERT & Telephone & ","
SQLINSERT = SQLINSERT & "'" & Email & "',"
SQLINSERT = SQLINSERT & "'" & Problem & "')"
set connRepairs = server.createobject ("ADODB.Connection")
connRepairs.open"Repairs"
connRepairs.execute(SQLINSERT)
connRepairs.close
%>
Vincent Guest
-
Error inserting records
I am getting this error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' Syntax error in INSERT INTO statement My code is as... -
no records
Hi, I am writing a jsp page to get data from db. <%@ Language=VBScript %> <!-- #include file="ConnString.asp" --> <html> <head> </head>... -
error when submit new DATE records
I have to insert new records by a add_form.asp. the database is access. When I submit a record, if the DATE textbox is empty, I have an error... -
DNS SRV Records?
Hi, how can I query DNS SRV records with ruby? regards Hadmut -- Hadmut Danisch http://www.danisch.de -
Urgent! Receiving error and duplicating records
Please bear in mind I have only been using Access since December/January, and have learned how to do what I've done in this short time by trial and... -
John Blessing #2
Re: Error with Records
"Vincent" <anonymous@discussions.microsoft.com> wrote in message
news:1353601c3f7ff$863c8460$a101280a@phx.gbl...Is Roomnumber as char type?> Hey Aaron,
>
> Your reply says "message unavailable"
> I am getting this error:
>
> Microsoft OLE DB Provider for ODBC Drivers
> error '80040e14'
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in
> INSERT INTO statement
>
> My code is as follows: What's wrong?
>
> <%@ Language = VBscript%>
>
> <%
> 'declare variables
>
> Dim FirstName
> Dim LastName
> Dim Building
> Dim RoomNumber
> Dim Telephone
> Dim Email
> Dim Problem
> Dim SQLINSERT
> Dim connRepairs
> Dim URL
>
> ' take variables from querystring
>
> FirstName = Request.querystring("FirstName")
> LastName = Request.querystring("LastName")
> Building = Request.queryString("Building")
> RoomNumber = Request.querystring("RoomNumber")
> Telephone = Request.querystring("Telephone")
> Email = Request.querystring("Email")
> Problem = Request.querystring("Problem")
>
> 'Create Insert statement for new client
>
> SQLINSERT = "INSERT INTO REPAIRS (FirstName, LastName,
> Building, RoomNumber, Telephone, Email, Problem)"
> SQLINSERT = SQLINSERT & "VALUES ("
> SQLINSERT = SQLINSERT & "'" & FirstName & "',"
> SQLINSERT = SQLINSERT & "'" & LastName & "',"
> SQLINSERT = SQLINSERT & "'" & Building & "',"
> SQLINSERT = SQLINSERT & "'" & RoomNumber & "',"
> SQLINSERT = SQLINSERT & Telephone & ","
> SQLINSERT = SQLINSERT & "'" & Email & "',"
> SQLINSERT = SQLINSERT & "'" & Problem & "')"
>
> set connRepairs = server.createobject ("ADODB.Connection")
> connRepairs.open"Repairs"
> connRepairs.execute(SQLINSERT)
> connRepairs.close
> %>
>
Is Telephone a numeric, otherwise it should also be in ''
Response.write the sqlinsert, copy it into Access and run it, it will show
you the part of the sql statement that is in error.
--
John Blessing
[url]http://www.LbeHelpdesk.com[/url] - Help Desk software priced to suit all
businesses
[url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
[url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
John Blessing Guest



Reply With Quote

