Click here to Skip to main content
16,013,516 members
Home / Discussions / Database
   

Database

 
GeneralRe: C# SQL express Login Pin
kadaen29-Dec-09 23:54
kadaen29-Dec-09 23:54 
GeneralRe: C# SQL express Login Pin
nagendrathecoder29-Dec-09 23:58
nagendrathecoder29-Dec-09 23:58 
GeneralRe: C# SQL express Login Pin
kadaen30-Dec-09 0:06
kadaen30-Dec-09 0:06 
GeneralRe: C# SQL express Login Pin
nagendrathecoder30-Dec-09 0:13
nagendrathecoder30-Dec-09 0:13 
GeneralRe: C# SQL express Login Pin
kadaen30-Dec-09 2:58
kadaen30-Dec-09 2:58 
GeneralRe: C# SQL express Login Pin
nagendrathecoder30-Dec-09 17:25
nagendrathecoder30-Dec-09 17:25 
AnswerRe: C# SQL express Login Pin
loyal ginger30-Dec-09 15:41
loyal ginger30-Dec-09 15:41 
GeneralRe: C# SQL express Login Pin
c0der200930-Dec-09 23:01
c0der200930-Dec-09 23:01 
I too think this is the way to go.

Step 1:
First you have to make sure the connection string is correct.

Try this.

string str = ("SELECT username,password FROM dbo.Login ");<br />
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(str, conn);            <br />
conn.Open();            <br />
DataTable dt = new DataTable();            System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(cmd);<br />
da.Fill(dt);


then debug and see if the da has all details from the database table.

Step 2:
If step 1 was successful, use your program, debug and see what is the value of str just before the query is fired. Execute that query directly from Query Analyzer and verify the results.
GeneralRe: C# SQL express Login Pin
kadaen31-Dec-09 4:14
kadaen31-Dec-09 4:14 
Questioncreate & update account numbersfor existing records Pin
Jassim Rahma29-Dec-09 22:52
Jassim Rahma29-Dec-09 22:52 
AnswerRe: create & update account numbersfor existing records Pin
Andy_L_J30-Dec-09 3:21
Andy_L_J30-Dec-09 3:21 
GeneralRe: create & update account numbersfor existing records Pin
Jassim Rahma31-Dec-09 2:01
Jassim Rahma31-Dec-09 2:01 
QuestionIntegrate sql server's Query Editor Window with C# Project Pin
Dot-Net-Dev29-Dec-09 22:26
Dot-Net-Dev29-Dec-09 22:26 
QuestionHow to access a password protected MS Access database Pin
pc_dev29-Dec-09 1:05
pc_dev29-Dec-09 1:05 
AnswerRe: How to access a password protected MS Access database Pin
Eddy Vluggen29-Dec-09 1:53
professionalEddy Vluggen29-Dec-09 1:53 
GeneralRe: How to access a password protected MS Access database Pin
pc_dev30-Dec-09 6:46
pc_dev30-Dec-09 6:46 
QuestionTSQL DATETIME Pin
cdpace28-Dec-09 21:58
cdpace28-Dec-09 21:58 
AnswerRe: TSQL DATETIME Pin
Eddy Vluggen28-Dec-09 23:05
professionalEddy Vluggen28-Dec-09 23:05 
AnswerRe: TSQL DATETIME PinPopular
WoutL29-Dec-09 0:21
WoutL29-Dec-09 0:21 
GeneralRe: TSQL DATETIME Pin
cdpace29-Dec-09 3:16
cdpace29-Dec-09 3:16 
QuestionInteresting question about a MIN function and usage Pin
James Shao28-Dec-09 15:10
James Shao28-Dec-09 15:10 
AnswerRe: Interesting question about a MIN function and usage Pin
Luc Pattyn28-Dec-09 15:37
sitebuilderLuc Pattyn28-Dec-09 15:37 
GeneralRe: Interesting question about a MIN function and usage [modified] Pin
James Shao28-Dec-09 21:51
James Shao28-Dec-09 21:51 
GeneralRe: Interesting question about a MIN function and usage Pin
Luc Pattyn29-Dec-09 0:57
sitebuilderLuc Pattyn29-Dec-09 0:57 
GeneralRe: Interesting question about a MIN function and usage Pin
James Shao29-Dec-09 4:24
James Shao29-Dec-09 4:24 

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.