Click here to Skip to main content
15,920,896 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: connectivity in asp Pin
rakeshs3123-Mar-09 23:22
rakeshs3123-Mar-09 23:22 
AnswerRe: connectivity in asp Pin
Karthick_gc3-Mar-09 23:42
Karthick_gc3-Mar-09 23:42 
AnswerRe: connectivity in asp [modified] Pin
Greg Chelstowski3-Mar-09 23:52
Greg Chelstowski3-Mar-09 23:52 
Well, there's a bug in your sql string though.
Not sure it's gonna run without the space after count(*).
Plus!
I'm pretty sure the column username would be an nvarchar, as most likely would the column password.
Hence, you have to use inverted commas. (').
BUT.
The best way yet to do it would be to add parameters to it instead, like so:

SqlCommand cm = new SqlCommand("select count(*) from myusers where username= @usrnm and password=@password",cn);

cm.Parameters.Add("@usrnm", SqlDbType.NVarChar).Value = textBox1.Text;
cm.Parameters.Add("@password", SqlDbType.NVarChar).Value = textBox2.Text;

Now try it Wink | ;)

var question = (_2b || !(_2b));

modified on Wednesday, March 4, 2009 6:00 AM

AnswerRe: connectivity in asp Pin
Abhijit Jana4-Mar-09 0:08
professionalAbhijit Jana4-Mar-09 0:08 
QuestionGridview? Pin
Karthick_gc3-Mar-09 23:03
Karthick_gc3-Mar-09 23:03 
AnswerRe: Gridview? Pin
rakeshs3123-Mar-09 23:16
rakeshs3123-Mar-09 23:16 
GeneralRe: Gridview? Pin
Karthick_gc3-Mar-09 23:31
Karthick_gc3-Mar-09 23:31 
GeneralRe: Gridview? Pin
keyur satyadev3-Mar-09 23:47
keyur satyadev3-Mar-09 23:47 
GeneralRe: Gridview? Pin
Karthick_gc3-Mar-09 23:56
Karthick_gc3-Mar-09 23:56 
GeneralRe: Gridview? Pin
keyur satyadev4-Mar-09 0:16
keyur satyadev4-Mar-09 0:16 
GeneralRe: Gridview? Pin
Karthick_gc4-Mar-09 0:40
Karthick_gc4-Mar-09 0:40 
GeneralRe: Gridview? Pin
keyur satyadev4-Mar-09 1:18
keyur satyadev4-Mar-09 1:18 
GeneralRe: Gridview? Pin
Karthick_gc4-Mar-09 1:25
Karthick_gc4-Mar-09 1:25 
GeneralRe: Gridview? Pin
anujbanka17844-Mar-09 1:37
anujbanka17844-Mar-09 1:37 
GeneralRe: Gridview? Pin
keyur satyadev4-Mar-09 1:47
keyur satyadev4-Mar-09 1:47 
QuestionTextbox value must be numeric and non zero Pin
Reddy19833-Mar-09 22:51
Reddy19833-Mar-09 22:51 
AnswerRe: Textbox value must be numeric and non zero [modified] Pin
rakeshs3123-Mar-09 23:12
rakeshs3123-Mar-09 23:12 
AnswerRe: Textbox value must be numeric and non zero [modified] Pin
codingrocks3-Mar-09 23:16
codingrocks3-Mar-09 23:16 
GeneralRe: Textbox value must be numeric and non zero Pin
Reddy19833-Mar-09 23:27
Reddy19833-Mar-09 23:27 
GeneralRe: Textbox value must be numeric and non zero Pin
J4amieC4-Mar-09 0:29
J4amieC4-Mar-09 0:29 
AnswerRe: Textbox value must be numeric and non zero Pin
dan!sh 4-Mar-09 5:22
professional dan!sh 4-Mar-09 5:22 
Questionvalue of a cell of selected row Pin
foryou3-Mar-09 22:19
foryou3-Mar-09 22:19 
AnswerRe: value of a cell of selected row Pin
Greg Chelstowski3-Mar-09 22:36
Greg Chelstowski3-Mar-09 22:36 
GeneralRe: value of a cell of selected row Pin
foryou4-Mar-09 0:30
foryou4-Mar-09 0:30 
Questiongrid view paging problem. when i use paging it not give proper result.. Pin
anujbanka17843-Mar-09 21:57
anujbanka17843-Mar-09 21:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.