Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
DataTable dt = new DataTable();
           con = new SqlConnection(strcon);
           SqlDataAdapter adapt = new SqlDataAdapter("select * from customer where id=@a,password=@b,confirm=@c", con);
           adapt.SelectCommand.Parameters.AddWithValue("@a",id);
           adapt.SelectCommand.Parameters.AddWithValue("@b",password);
           adapt.SelectCommand.Parameters.AddWithValue("@c",confirm);
           adapt.Fill(dt);
Posted
Updated 27-Jan-13 19:33pm
v2
Comments
joshrduncan2012 24-Jan-13 14:03pm    
Look at your parameters...you may need to change the commas to periods.

where id=@a,password=@b,confirm=@c

I think you want ANDs.
 
Share this answer
 
v2
SQL
your query will be like follwoing.you are missing <code>and</code>
SqlDataAdapter adapt = new SqlDataAdapter("select * from customer where id=@a and password=@b and confirm=@c", con);


Thanks
 
Share this answer
 
Hi,

Please check with this links.
while your calling select statement with multiple conditions don't use"," instead of this you can use "AND".

http://www.tuxradar.com/practicalphp/9/3/13[^]
https://developers.google.com/bigquery/docs/query-reference#where[^]


Please check with this links this might be help for you..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900