Howdy, Stranger!

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

Categories

Searching an access database

jtmuzixjtmuzix Member Posts: 15
I'm using VB.NET 2003. I'm having problems doing a search on an access database. No matter what I try it always returns 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 million different variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
Thanks,
Jason Tutwiler

Comments

  • btsebbtseb Member Posts: 67
    : I'm using VB.NET 2003. I'm having problems doing a search on an access database. No matter what I try it always returns 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 million different variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
    : Thanks,
    : Jason Tutwiler
    :

    Jason:

    It appears that it might be that the "cbdep.selecteditem" is returning a null value. If that is the case then you get nothing back from your query. You might try and set a variable, load the selecteditem into it and put a watch on it to insure it is being populated.
  • ultimageultimage Member Posts: 119
    : I'm using VB.NET 2003. I'm having problems doing a search on an access database. No matter what I try it always returns 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 million different variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
    : Thanks,
    : Jason Tutwiler
    :


    you problem is this: cbdep.selecteditem

    try using something similar to this: cbdep.selecteditem.text

    hope this helps
    Ultimage
    ultimage@insightbb.com

  • ProgressProgress Member Posts: 13
    : : I'm using VB.NET 2003. I'm having problems doing a search on an access database. No matter what I try it always returns 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 million different variations thinking maybe I am syntactically incorrect. I've also tried a dataview and the .filterrow or .rowfilter function. It doesn't work either. Any code ideas on HOW to search an access database and fill the dataset respectivley would be greatly apperaited.
    : : Thanks,
    : : Jason Tutwiler
    : :
    :
    :
    : you problem is this: cbdep.selecteditem
    :
    : try using something similar to this: cbdep.selecteditem.text
    :
    : hope this helps
    : Ultimage
    : ultimage@insightbb.com
    :
    :
    i always use simple ado commands about this search in vb6

    Adodc1.RecordSource = "select * from where <...>like " & " " & Text1(0).Text
    Call Adodc1.Refresh
    DataGrid1.EditActive = True
    and and text1.text :from interface..
Sign In or Register to comment.