|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error Messages
OK, this page is recieving data from a form... Just one piece and that is the serial number for a cable box. This is just a small program to trck cable boxes. I have tried to write this page several ways and keep getting errors. ANY HELP WILL BE GREAT!!! Thank you in advance. It seems like the line giving me trouble is the rs.open sql, conn.
I blocked out other lines and when I block this out it seems to be happier with it. Anyway my main error is Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression '[serialNumber] ='. /jld341/cableline/assignconvertor2.asp, line 11 Here is the code... THANK YOU VERY MUCH IN ADVANCE <%@LANGUAGE="VBSCRIPT"%> <% accessDB = "cableline.mdb" DSNStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath(accessdb) & ";" set conn = Server.CreateObject("ADODB.Connection") conn.open DSNStr dim Serial Serial = request.form("converterSerialNumber") SQL = "SELECT * FROM converter WHERE [serialNumber] = " & Serial Set rs = Server.CreateObject("ADODB.Recordset") rs.open SQL, Conn 'rs("techNumber") = request.Cookies("cableline")("techNumber") 'rs.update ' Done. Close the connection 'conn.Close 'Set conn = Nothing 'response.Redirect("assignconvertor.asp") %> |
|
#2
|
||||
|
||||
|
try this
Code:
SQL = "SELECT * FROM converter WHERE [serialNumber] = " & Serial & ";" |
|
#3
|
|||
|
|||
|
what is the data type of serialNumber? is it a String? if it is i think you need to add single quote (').
SQL = "SELECT * FROM converter WHERE [serialNumber] = ' " & Serial & " ' " cheers |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Error Messages |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|