Click here to Skip to main content
15,897,968 members
Home / Discussions / C#
   

C#

 
QuestionWCF - Client Wait Other Client [modified] Pin
dataminers18-Oct-09 11:13
dataminers18-Oct-09 11:13 
AnswerRe: WCF - Client Wait Other Client Pin
Ravi Bhavnani18-Oct-09 18:11
professionalRavi Bhavnani18-Oct-09 18:11 
GeneralRe: WCF - Client Wait Other Client Pin
dataminers18-Oct-09 20:53
dataminers18-Oct-09 20:53 
AnswerRe: WCF - Client Wait Other Client [modified] Pin
Mirko198018-Oct-09 23:08
Mirko198018-Oct-09 23:08 
Questioncustom control events Pin
teknolog12318-Oct-09 10:00
teknolog12318-Oct-09 10:00 
AnswerRe: custom control events Pin
DaveyM6918-Oct-09 10:22
professionalDaveyM6918-Oct-09 10:22 
GeneralRe: custom control events Pin
teknolog12318-Oct-09 12:01
teknolog12318-Oct-09 12:01 
GeneralRe: custom control events Pin
Dave Kreskowiak18-Oct-09 12:51
mveDave Kreskowiak18-Oct-09 12:51 
GeneralRe: custom control events Pin
teknolog12319-Oct-09 5:29
teknolog12319-Oct-09 5:29 
QuestionSave everything but the blob to DB Pin
JRivord18-Oct-09 8:46
JRivord18-Oct-09 8:46 
AnswerRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 9:28
mentorNot Active18-Oct-09 9:28 
GeneralRe: Save everything but the blob to DB Pin
JRivord18-Oct-09 9:50
JRivord18-Oct-09 9:50 
GeneralRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 10:18
mentorNot Active18-Oct-09 10:18 
QuestionBindingContext question Pin
HarrisonBrock18-Oct-09 7:41
HarrisonBrock18-Oct-09 7:41 
AnswerRe: BindingContext question Pin
dataminers18-Oct-09 11:16
dataminers18-Oct-09 11:16 
GeneralRe: BindingContext question Pin
HarrisonBrock18-Oct-09 12:42
HarrisonBrock18-Oct-09 12:42 
QuestionListboxes etc. on top of video Pin
lvq68418-Oct-09 7:29
lvq68418-Oct-09 7:29 
AnswerRe: Listboxes etc. on top of video Pin
Not Active18-Oct-09 9:26
mentorNot Active18-Oct-09 9:26 
GeneralRe: Listboxes etc. on top of video Pin
lvq68418-Oct-09 22:04
lvq68418-Oct-09 22:04 
QuestionTrying to send email... Pin
JollyMansArt18-Oct-09 6:50
JollyMansArt18-Oct-09 6:50 
AnswerRe: Trying to send email... Pin
Manas Bhardwaj18-Oct-09 9:19
professionalManas Bhardwaj18-Oct-09 9:19 
AnswerRe: Trying to send email... Pin
Not Active18-Oct-09 9:25
mentorNot Active18-Oct-09 9:25 
Questioncheck the text box string dynamically with database field Pin
Mangesh Tomar18-Oct-09 6:22
Mangesh Tomar18-Oct-09 6:22 
in my program i am developing login for user for standalone system
here i check the condition whether the user is valid or not ?
In my data base i store some name and passward and check whethre it present in database or not but my prog check only one user eg. Admin and passward
ie. problem in condition checking i want prog. who check other user also ie. if i type diffrent user name such as xyz and pssw. too so how i check this value in data base .
Here is my code:-


namespace loginscreen
{
public partial class Form1 : Form
{
OleDbCommand cmd = new OleDbCommand();
OleDbConnection con = new OleDbConnection();

String Path = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source= C:\\sms.mdb; Persist Security Info=False";
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{

con = new OleDbConnection(Path);
cmd = new OleDbCommand(" select * from login ", con);
con.Open();
OleDbDataReader reader = cmd.ExecuteReader();

string usernamedb, passwarddb;
string passwardtxtbx, usernametxtbx;

usernametxtbx = tbName.Text.ToString();
passwardtxtbx = tbPassward.Text.ToString();


while (reader.Read())
{
usernamedb = (reader.GetString(0));
passwarddb = (reader.GetString(1));


if (tbName.Text == "Admin")
{
if (tbName.Text == reader.GetString(0))
{
if (tbPassward.Text == reader.GetString(1))
{
MessageBox.Show("login successfully");
return;

}
else
{
MessageBox.Show("Try Again");
return;
}
}
}
}
con.Close();
}

}

}
AnswerRe: check the text box string dynamically with database field Pin
Luc Pattyn18-Oct-09 11:11
sitebuilderLuc Pattyn18-Oct-09 11:11 
QuestionPass Excel.Application from Excel 2007 Custom Task Pane to Hosted PowerShell Pin
Uros Calakovic18-Oct-09 4:07
Uros Calakovic18-Oct-09 4:07 

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.