Click here to Skip to main content
15,885,365 members
Home / Discussions / C#
   

C#

 
AnswerRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 8:15
professionalPaul Conrad2-Aug-08 8:15 
GeneralRe: VS 2005 Server Explorer Pin
benjamin yap2-Aug-08 8:19
benjamin yap2-Aug-08 8:19 
GeneralRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 8:23
professionalPaul Conrad2-Aug-08 8:23 
GeneralRe: VS 2005 Server Explorer Pin
benjamin yap2-Aug-08 8:25
benjamin yap2-Aug-08 8:25 
GeneralRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 9:38
professionalPaul Conrad2-Aug-08 9:38 
GeneralRe: VS 2005 Server Explorer Pin
benjamin yap2-Aug-08 19:44
benjamin yap2-Aug-08 19:44 
GeneralRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 19:48
professionalPaul Conrad2-Aug-08 19:48 
GeneralRe: VS 2005 Server Explorer Pin
benjamin yap2-Aug-08 20:06
benjamin yap2-Aug-08 20:06 
Ok when i created a new Query, they asked me Type of SQL query to use.

SELECT which return rows
SELECT which return single value
UPDATE
DELETE
INSERT

At first, i selected "SELECT which return rows" and they asked for 3 arguement. dataTable, string nric and string password.


So i change to "SELECT which return single value"

string result = sa.ValidateLogin(txtUsername.Text, txtPassword.Text);
MessageBox.Show(result.ToString());


When i key the correct username and password, the messagebox shows the username. If i enter a wrong username and password, the whole program ended and point to my code and says, NullReferenceException was unhandled.

If the correct username was found, i want to store the results of other columm to my variable i declared. Because my staff table have

nric, name, [password], dob, address, tel_mobile, tel_home, catalogueAccess, inventoryAccess, orderAccess, adminAccess, staffAccess


if the username and password matches, i want to store all the values to the variable i create at the top of my LoginForm.cs

private bool catManager;
private bool inventManager;
private bool orderManager;
private bool administrator;
private bool user;


how do i do that?
GeneralRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 20:11
professionalPaul Conrad2-Aug-08 20:11 
GeneralRe: VS 2005 Server Explorer [modified] Pin
benjamin yap2-Aug-08 20:25
benjamin yap2-Aug-08 20:25 
GeneralRe: VS 2005 Server Explorer Pin
Paul Conrad2-Aug-08 20:50
professionalPaul Conrad2-Aug-08 20:50 
GeneralRe: VS 2005 Server Explorer Pin
benjamin yap3-Aug-08 2:29
benjamin yap3-Aug-08 2:29 
QuestionThreading, just professionall please... Pin
mr.mohsen2-Aug-08 6:32
mr.mohsen2-Aug-08 6:32 
AnswerRe: Threading, just professionall please... Pin
Mark Salsbery2-Aug-08 7:30
Mark Salsbery2-Aug-08 7:30 
AnswerRe: Threading, just professionall please... Pin
User 66582-Aug-08 7:41
User 66582-Aug-08 7:41 
QuestionDNS issue Pin
George_George2-Aug-08 3:45
George_George2-Aug-08 3:45 
QuestionDownload .css and script files on downloading aspx page [modified] Pin
Medha jha2-Aug-08 1:12
Medha jha2-Aug-08 1:12 
QuestionDNS access error? Pin
George_George2-Aug-08 1:10
George_George2-Aug-08 1:10 
AnswerRe: DNS access error? Pin
S. Senthil Kumar2-Aug-08 7:54
S. Senthil Kumar2-Aug-08 7:54 
GeneralRe: DNS access error? Pin
George_George3-Aug-08 17:22
George_George3-Aug-08 17:22 
QuestionSql Transactions Pin
mrcooll1-Aug-08 23:56
mrcooll1-Aug-08 23:56 
AnswerRe: Sql Transactions Pin
mrcooll2-Aug-08 2:53
mrcooll2-Aug-08 2:53 
AnswerRe: Sql Transactions Pin
PIEBALDconsult2-Aug-08 5:24
mvePIEBALDconsult2-Aug-08 5:24 
QuestionHow to forbid a control to get focus ? Pin
xu_xuthus1-Aug-08 23:55
xu_xuthus1-Aug-08 23:55 
AnswerRe: How to forbid a control to get focus ? Pin
PIEBALDconsult2-Aug-08 5:18
mvePIEBALDconsult2-Aug-08 5:18 

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.