PC Review


Reply
Thread Tools Rate Thread

DataAdapter not being populated using LIKE in select

 
 
ChrisC
Guest
Posts: n/a
 
      25th Jul 2003
I am using Framwork 1.1, C#, and Access 2000.

My table is called "sample1".If has only 1 column
called "firstname" in it.

There are 3 rows in "firstname":

this is a dog
I have no doggies
there are only cats here

Now, if I use the following select:

SELECT sample1.firstname FROM Sample1 where firstname
like '*dog*'

2 rows returned.

If I use the following :

OleDbCommand SelCmd = new OleDbCommand("SELECT
sample1.firstname FROM Sample1 where firstname
like '*dog*'",MyConn );

OleDbDataAdapter DAx = new OleDbDataAdapter();
DAx.SelectCommand = SelCmd;
DAx.Fill( ds, "sample1" );

Zero rows are returned and no exceptions are thrown. Is
there a problem i can't see in the parsing the provider
is doing or do I need to change the syntax?

Help! - thanks in advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select names box is not populated =?Utf-8?B?VG9ueQ==?= Microsoft Outlook Discussion 1 25th Jan 2007 05:19 AM
Update database using DataAdapter for DataSet populated from XMLfile? NorCan Microsoft ADO .NET 3 3rd Oct 2005 06:56 PM
DataAdapter - View actual sql executed (parameters populated) =?Utf-8?B?VFdhaGw=?= Microsoft ADO .NET 3 14th Jan 2005 03:15 PM
select populated cells Kevin Microsoft Excel Programming 1 23rd Sep 2004 07:52 PM
how to find out when a ListBox is populated or select it Valeria Microsoft Excel Programming 2 26th Jan 2004 12:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.