SQl 2005 Select /insert problem Error: Microsoft OLE DB Provider for ODBC Driv error '80040e14'

Last Post 05 Sep 2008 04:33 AM by mypolo. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
mypolo
New Member
New Member

--
03 Sep 2008 06:06 AM
Hello

making my first step with ASP in SQL 2005 :

I would like to make homepage with some question on ASP Sites and inserting the answers into a table on the SQL 2005 database.

For the recognition of the users I making some kind of tracking:
<% erkennung = Int(32768 * Rnd + 1) & "@" & Replace(Request.serverVariables("Remote_addr"),".","P") %>

and passing it from site to the other.

at the same time the answers is inserted into the database:

sql= "INSERT INTO web(vorname,name,erkennung,zeit)VALUES('" & vorname & "','" & name & "','" & erkennung & "','" & zeit & "')"




At the next site I am getting again the input form the database with select form from the table:

sql= "select* from web where erkennung='" & erkennung & "'" with the tracking erkennung.

the insert into the table works fine:
Table column for erkennung is varchar( max)

But for the select there is the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server] false Syntax near ther '099'. ( wich is erkennung)

If I put manually into the SQl 2005 Server Table for erkennung "test", then it works fine.

Some idea ?
mypolo
New Member
New Member

--
04 Sep 2008 11:10 PM
INSERT INTO web(vorname,name,erkennung,zeit)VALUES('t','t','5939@10P136P12P125','9:09:00 AM')
mypolo
New Member
New Member

--
05 Sep 2008 04:33 AM
Uuups: select* from web where erkennung=''20095@10P136P12P125''


Acceptable Use Policy
---