Problem while calling Ms Access Query from C# .net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhuvard
    New Member
    • Sep 2007
    • 6

    #1

    Problem while calling Ms Access Query from C# .net

    Hi,

    Will anybody please help me?

    I have a MS Access Database with 1 Tabel and 2 queries.
    e.g.

    Tabel "client": Client containing fields name,address,ci ty,state,ziip

    query1 "allClient" : Select * from client;
    query2 "SelectedClient ": Select * from client where name Like '%ab%';

    And I am using this database from my application developed in c# .net.

    When I am reading table "Client" or query1 "allClient" through OleDbDataReader it's working perfectly.

    But when I am using the same way with query2 "selectedClient " the datareader is empty eventhough there are some records in query result. The query is working nice in MS Access but not in my application.

    Thanks,
    Rajesh
  • davef
    New Member
    • Sep 2007
    • 98

    #2
    Originally posted by bhuvard
    Hi,

    Will anybody please help me?

    I have a MS Access Database with 1 Tabel and 2 queries.
    e.g.

    Tabel "client": Client containing fields name,address,ci ty,state,ziip

    query1 "allClient" : Select * from client;
    query2 "SelectedClient ": Select * from client where name Like '%ab%';

    And I am using this database from my application developed in c# .net.

    When I am reading table "Client" or query1 "allClient" through OleDbDataReader it's working perfectly.

    But when I am using the same way with query2 "selectedClient " the datareader is empty eventhough there are some records in query result. The query is working nice in MS Access but not in my application.

    Thanks,
    Rajesh
    Try query2 "SelectedClient ": Select * from client where name Like '*ab*';

    Comment

    Working...