If you want to access a specific row, then you should really be using ID numbers.
If you havent already, create a field in the table called "Row_ID" and make it an autonumber (i havent used access in years so dont remember exactly what its called)
You can then pass the Row_ID number around to specify specific records.
Also I would recommend against the "like" statement, as this is ment to allow you do close matchs eg
if you have "where field like 'A%'" then it will find all rows that the field starts with the letter A
the % is a wild card, so you could do " '%A%' " to find all containing A or " '%A' " all ending in A
what you should be doing is:
SELECT * FROM blog WHERE serial_number = '"&request.querystring("serialNum")&"' |
And I would recommend taking the direct request out like so:
Dim strSerialNumber strSerialNumber = request.querystring("serialNum") SELECT * FROM blog WHERE serial_number = '"& strSerialNumber &"'
|
If you use the Row_ID then I would do the following, which will help protect against SQL Injection Attacks:
Dim intSerialID
intSerialID = Request.Querystring("SID") if isNumber(intSerialID) then inSerialID = clng(intSerialID) else intSerialID = 0
SELECT * FROM blog WHERE Row_ID = "& intSerialID &"
|
This will make sure that intSerialID will always be a number