Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 24-Jan-13 7:53am
Edited 27-Jan-13 19:33pm
v2
Comments
joshrduncan2012 at 24-Jan-13 14:03pm
   
Look at your parameters...you may need to change the commas to periods.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

where id=@a,password=@b,confirm=@c
 
I think you want ANDs.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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..
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100