Re: DataTable.select problem with variables
- From: Manikandan <plmanikandan@xxxxxxxxx>
- Date: 1 May 2007 04:46:13 -0700
On May 1, 12:02 pm, "Jon Skeet [C# MVP]" <s...@xxxxxxxxx> wrote:
On May 1, 11:50 am, Manikandan <plmanikan...@xxxxxxxxx> wrote:
<snip>
I'm actually taking the values from database(sql server) and using in
select statement.
For demonstration only i used above code, is there any chance of
problem from sql server 2000
Possibly - it's hard to know for sure.
Could you post a short but complete program which demonstrates the
problem?
Seehttp://pobox.com/~skeet/csharp/complete.htmlfor more details.
Jon
Hi,
Thanks Jon
I found the mistake after adding the single quotes i gave a space and
then double quotes, while debugging it doesn't show the space(unable
to find the space while debugging, so i think it was correct)
mistaken one
string qry="s1= ' " + v1 + " ' AND s2=' " + v2 + " '" ;
Correct one
string qry="s1= '" + v1 + "' AND s2='" + v2 + "'" ;
Thank You,
Regards,
Mani
.
- Follow-Ups:
- Re: DataTable.select problem with variables
- From: Nicholas Paldino [.NET/C# MVP]
- Re: DataTable.select problem with variables
- References:
- DataTable.select problem with variables
- From: Manikandan
- Re: DataTable.select problem with variables
- From: Jon Skeet [C# MVP]
- Re: DataTable.select problem with variables
- From: Manikandan
- Re: DataTable.select problem with variables
- From: Jon Skeet [C# MVP]
- DataTable.select problem with variables
- Prev by Date: Re: step through a struct using foreach
- Next by Date: Re: step through a struct using foreach
- Previous by thread: Re: DataTable.select problem with variables
- Next by thread: Re: DataTable.select problem with variables
- Index(es):
Relevant Pages
|