trying to search an access db, no luck - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

trying to search an access db, no luck

jtmuzixjtmuzix Posts: 15Member
I'm using Visual Basic.NET 2003 professional. I am having problems doing a search on an Access database. No matter what I try it's always returning false. I can fill the dataset with an entire table but have had no luck filling it with a specific 'recordset' or return set. I've tried using commandselect.commandtext = "SELECT * FROM [scannerlog] WHERE [Department = & "'cbdep.selecteditem & '" I've tried a lot of different (syntax)variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. It returns false as well, UNLESS I put in the string department; then it returns true. It's not the specific word 'department' I want to compare, it's THE specific department(i.e. shipping, recieving, HR). If it finds 1 match or 100 matches it SHOULD display all the data in the table relative to the matches it finds. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
Thanks,
Jason Tutwiler

Comments

  • Geoff-SGeoff-S Posts: 82Member
    : I'm using Visual Basic.NET 2003 professional. I am having problems doing a search on an Access database. No matter what I try it's always returning false. I can fill the dataset with an entire table but have had no luck filling it with a specific 'recordset' or return set. I've tried using commandselect.commandtext = "SELECT * FROM [scannerlog] WHERE [Department = & "'cbdep.selecteditem & '" I've tried a lot of different (syntax)variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. It returns false as well, UNLESS I put in the string department; then it returns true. It's not the specific word 'department' I want to compare, it's THE specific department(i.e. shipping, recieving, HR). If it finds 1 match or 100 matches it SHOULD display all the data in the table relative to the matches it finds. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
    : Thanks,
    : Jason Tutwiler
    :
    :
    Hi JT
    I put the response to this in your post in the "Access databases and VB" forum.
    :-)
Sign In or Register to comment.