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 ?