Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   I'm using visual basic 2008 express edition and I'm not sure how to attach my query (http://www.go4expert.com/forums/im-using-visual-basic-2008-express-t24083/)

babe20042004 4Dec2010 00:59

I'm using visual basic 2008 express edition and I'm not sure how to attach my query
 
I'm using visual basic 2008 express edition and I'm not sure how to attach my query in order for it to run?

I've been using trying to use visual basic to create a form which retrieves data from a Microsoft access database and filters the data to find the record starting with the letter retrieved from the user. When it is run without the query the data grid shows all the records. However when my original query is put in the application changes it and the value shown is null in all fields.

This is what i had before
SELECT Allergies, Breakfast, Lunch, Supper, FirstName, LastName, MealDate, StudentId
FROM [Student Checklist]
WHERE (LastName LIKE @LastName + '%')

This is what was returned
SELECT Allergies, Breakfast, Lunch, Supper, FirstName, LastName, MealDate, StudentId
FROM [Student Checklist]
WHERE (LastName LIKE '@LastName' + '%')


All times are GMT +5.5. The time now is 21:14.