Click here to Skip to main content
15,907,905 members
Home / Discussions / Database
   

Database

 
GeneralRe: Update Database Pin
Colin Angus Mackay13-Aug-04 12:57
Colin Angus Mackay13-Aug-04 12:57 
Generalstart MSSQLServer Service from windows 98 Pin
Renjith Ramachandran13-Aug-04 1:07
Renjith Ramachandran13-Aug-04 1:07 
GeneralRe: start MSSQLServer Service from windows 98 Pin
Colin Angus Mackay13-Aug-04 3:46
Colin Angus Mackay13-Aug-04 3:46 
GeneralRe: start MSSQLServer Service from windows 98 Pin
Renjith Ramachandran13-Aug-04 5:26
Renjith Ramachandran13-Aug-04 5:26 
GeneralRe: start MSSQLServer Service from windows 98 Pin
Colin Angus Mackay13-Aug-04 13:09
Colin Angus Mackay13-Aug-04 13:09 
GeneralODBC Pin
lawred212-Aug-04 4:02
lawred212-Aug-04 4:02 
GeneralRe: ODBC Pin
Chris Meech13-Aug-04 6:56
Chris Meech13-Aug-04 6:56 
Generalcompare values from user to database using C# Pin
dyerstein11-Aug-04 14:56
dyerstein11-Aug-04 14:56 
O.K., here's my question, and please forgive me if it has been asked before. I have a database that that stores user details (username / PAssword) in an Access database in a table called Trader, I am wring a front end application in C# (first time!) that needs to get from a user via a window form and store the values in variables i.e.

string Password(label Password)
string Username(label Username)

now I want to compare those values enter by the user above to the table Trader, to check if the values match, how do I go about doing that??

here is as far as I got:

// Specify SQL Server-specific connection string
SqlConnection thisConnection = new SqlConnection(....)

// Open Connection
thisConnection.Open()

// Create comand for this connection
SqlCommand thisCommand = thisConnection.CreateCommand();

// Specify SQL query for this command
thisCommand.CommandText = "SELECT UserName, Password from Traders"

// Execute thisReader for specified command
SqlDataReader thisReader = thisCommand.ExecuteReader()

// While there are row to read
while (thisReader.Read())
{

What do I do here? how do I programatically compare my values taken from
from the user(via the C# Form - UserName / Password to the values stored
in the table that I want to compare with? All the examples I can find
output the values via Console.WriteLine()??

I hope this is not to long!

GeneralRe: compare values from user to database using C# Pin
Colin Angus Mackay12-Aug-04 0:10
Colin Angus Mackay12-Aug-04 0:10 
GeneralRe: compare values from user to database using C# Pin
dyerstein16-Aug-04 5:34
dyerstein16-Aug-04 5:34 
GeneralVB.NET Console application and SQLServer Pin
sybux200011-Aug-04 4:54
sybux200011-Aug-04 4:54 
GeneralRe: VB.NET Console application and SQLServer Pin
VenkatFor.NET11-Aug-04 5:14
VenkatFor.NET11-Aug-04 5:14 
GeneralRe: VB.NET Console application and SQLServer Pin
sybux200011-Aug-04 6:30
sybux200011-Aug-04 6:30 
GeneralRe: VB.NET Console application and SQLServer Pin
VenkatFor.NET11-Aug-04 6:56
VenkatFor.NET11-Aug-04 6:56 
GeneralRe: VB.NET Console application and SQLServer Pin
Rob Graham11-Aug-04 7:10
Rob Graham11-Aug-04 7:10 
GeneralRe: VB.NET Console application and SQLServer Pin
sybux200011-Aug-04 19:28
sybux200011-Aug-04 19:28 
GeneralRe: VB.NET Console application and SQLServer Pin
sybux200012-Aug-04 2:59
sybux200012-Aug-04 2:59 
QuestionSELECT statements in INNER JOINs? Pin
MS le Roux11-Aug-04 4:16
MS le Roux11-Aug-04 4:16 
AnswerRe: SELECT statements in INNER JOINs? Pin
Michael Potter11-Aug-04 4:26
Michael Potter11-Aug-04 4:26 
AnswerRe: SELECT statements in INNER JOINs? Pin
Colin Angus Mackay11-Aug-04 4:31
Colin Angus Mackay11-Aug-04 4:31 
Questionhow to bind crystal reports Pin
jaan leva11-Aug-04 1:55
jaan leva11-Aug-04 1:55 
AnswerRe: how to bind crystal reports Pin
Member 53081012-Aug-04 3:20
Member 53081012-Aug-04 3:20 
GeneralRe: how to bind crystal reports - Use this code Pin
cvp7712-Aug-04 21:34
cvp7712-Aug-04 21:34 
GeneralMSDE Pin
Renjith Ramachandran11-Aug-04 0:04
Renjith Ramachandran11-Aug-04 0:04 
GeneralRe: MSDE Pin
Renjith Ramachandran13-Aug-04 1:03
Renjith Ramachandran13-Aug-04 1:03 

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.