-
Like Query from VB
I have the following LIKE sql call. It works if I click on the query in access and type in the @search parameter by hand. If I call it from VB express, the query returns false even if I type in the same thing. Any help would be appreciated guys. THANKS
Emily
ACCESS
SELECT *
FROM project
WHERE project.ProjectName LIKE "*" & [@search] & "*";
VB express
objData.SQL = "usp_SearchProjects"
objData.InitializeCommand()
objData.AddParameter("@search", Data.OleDb.OleDbType.Char, 50, _
txtSearch.Text)
objData.OpenConnection()
objData.DataReader = objData.Command.ExecuteReader
MsgBox(objData.DataReader.HasRows)
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules