Line 84:
Line 85: searchDataAdapter = New System.data.sqlclient.sqldataadapter("SELECT * FROM Inventory Where title=" & title, searchConnection)
Line 86: searchDataAdapter.Fill(objItemInfo, "ItemInfo")
Line 87:
Line 88: Return objItemInfo
here is the error
Line 1: Incorrect syntax near '='.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
Source Error:
Try adding single quotes:
searchDataAdapter = New System.data.sqlclient.sqldataadapter("SELECT * FROM Inventory Where title='" & title & "'", searchConnection)
HTH,
Ryan
try this
SELECT * FROM Inventory Where title=' " & title & " '
No comments:
Post a Comment