E
Evertjan.
Haziq wrote on 05 apr 2010 in microsoft.public.inetserver.asp.general:
There is no ASP-code only VBscript-code or Javascript-code on an ASP
platform. Below I will assume ASP-VBS.
" ... WHERE CustomerID=CustomerID" is not very logical,
how would the database enging know what customer it needs to look for?
Try:
sql = "SELECT * FROM tblCustomers WHERE CustomerID = " & CustomerID
response.write sql
response.end
''' Always first debug by writing the sql result string,
''' only if you are happy with that go on with:
set mD = CONNECT.Execute(sql)
if not mD.eof then
'' do what you must if found
else
response.write "No CustomerID "&CustomerID&" exists in tblCustomers"
end if
How to modyfy rs.Open "SELECT * FROM Customers WHERE
CustomerID=CustomerID",
There is no ASP-code only VBscript-code or Javascript-code on an ASP
platform. Below I will assume ASP-VBS.
" ... WHERE CustomerID=CustomerID" is not very logical,
how would the database enging know what customer it needs to look for?
Try:
sql = "SELECT * FROM tblCustomers WHERE CustomerID = " & CustomerID
response.write sql
response.end
''' Always first debug by writing the sql result string,
''' only if you are happy with that go on with:
set mD = CONNECT.Execute(sql)
if not mD.eof then
'' do what you must if found
else
response.write "No CustomerID "&CustomerID&" exists in tblCustomers"
end if