473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

DataTable.Selec()

Max
We are seeing strange problems with Select().

We have expression like this DataTable.Select("col1='101'and col2=1") the
returned datarows include col2 =2. If I just do DataTable.Select("col2=2")
it works.

This type of error is not consistent. we are not understanding the random
behavior. Anybody has any ideas on what to check?
Nov 16 '05 #1
3 1730
hi can you post the definition of the DataTable , I mean col2 type and all ?

"Max" wrote:
We are seeing strange problems with Select().

We have expression like this DataTable.Select("col1='101'and col2=1") the
returned datarows include col2 =2. If I just do DataTable.Select("col2=2")
it works.

This type of error is not consistent. we are not understanding the random
behavior. Anybody has any ideas on what to check?

Nov 16 '05 #2
Hi Max,

Could you try:
DataTable.Select("[col1]='101' AND [col2]=1");
Maybe it is problem with lower case or with separator's
absence between "'101'" & "and".

HTH

Marcin
We are seeing strange problems with Select().

We have expression like this DataTable.Select("col1='101'and col2=1") the
returned datarows include col2 =2. If I just do DataTable.Select("col2=2")
it works.

This type of error is not consistent. we are not understanding the random
behavior. Anybody has any ideas on what to check?

Nov 16 '05 #3
Are you working with .Net Framework 1.1 with SP1?
If so go to Add/Remove programs, remove the .Net Framework 1.1 and then
reinstall it without SP1.
Try the same filter expression again.

Maybe it is a .Net Framework 1.1 SP1 bug as everyone else is complaining...

"Max" wrote:
We are seeing strange problems with Select().

We have expression like this DataTable.Select("col1='101'and col2=1") the
returned datarows include col2 =2. If I just do DataTable.Select("col2=2")
it works.

This type of error is not consistent. we are not understanding the random
behavior. Anybody has any ideas on what to check?

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
5
by: Stefan Turalski \(stic\) | last post by:
Hi, I'm wondering if there is a way to send a method parametrs by ref when DataTabel is a type of this value ? I done some sort of select over DataTable columns, just by removing them froma...
2
by: Newbie | last post by:
Im getting an exception: System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at...
1
by: TaeHo Yoo | last post by:
Hi all, After sorting and grouping data using a dataview, then how to transfer the changed datatable in the dataview to a datatable in C#? Cheers
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
7
by: Raymond Lewallen | last post by:
Which would be the proper way or the reason for using any of the following or combinations of the following? These are the 3 ways I've figured I can do what I want to do, I just don't know which...
3
by: Gene Hubert | last post by:
I'm using DataTable.ImportRow to move data from one datatable to another... Dim dt, dtTarget As DataTable Dim dr As DataRow dt = DirectCast(Me.DataSource, DataTable) dtTarget = dt.Clone...
0
by: Maart_newbie | last post by:
Hi all, I've got a question about returning the value of a pk-column to a DataTable after inserting a row (via a data-adapter) using MySql5. Here is the SQL and code concerned: ...
5
by: Frank Hauptlorenz | last post by:
Hello, I recognized some days ago, that returning a DataTable blocks my WCF-Service. Is this a known bug? If I add this table to a new DataSet() and return this, it works. Thank you, Frank
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.