Click here to Skip to main content
15,889,909 members
Home / Discussions / C#
   

C#

 
AnswerRe: smart device Forms-Database [modified] Pin
Tim Yen13-Apr-10 2:55
Tim Yen13-Apr-10 2:55 
GeneralRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 3:11
sitebuilderLuc Pattyn13-Apr-10 3:11 
GeneralRe: smart device Forms-Database Pin
Tunisien8613-Apr-10 4:17
Tunisien8613-Apr-10 4:17 
AnswerRe: smart device Forms-Database [modified] Pin
O.Phil13-Apr-10 4:11
O.Phil13-Apr-10 4:11 
GeneralRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 4:20
sitebuilderLuc Pattyn13-Apr-10 4:20 
GeneralRe: smart device Forms-Database Pin
O.Phil13-Apr-10 4:26
O.Phil13-Apr-10 4:26 
GeneralRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 4:29
sitebuilderLuc Pattyn13-Apr-10 4:29 
GeneralRe: smart device Forms-Database Pin
Tunisien8613-Apr-10 6:01
Tunisien8613-Apr-10 6:01 
Hi,
I add what u tell me about but still the same problem.
private void button1_Click(object sender, EventArgs e)
{
/*string req = "select Login, MotPasse from Connexion";
DataTable tab = new DataTable();
SqlCeCommand com = new SqlCeCommand(req, sqlceconn);
SqlCeDataAdapter ada = new SqlCeDataAdapter(com);
ada.Fill(tab);*/
string s1 = textBox1.Text;
string s2 = textBox2.Text;
SqlCeConnection cnx = new SqlCeConnection();
string wCS = String.Format("DATA SOURCE = '{0}';", Program.gFichierBase);
cnx.ConnectionString = wCS;
string req = "SELECT * FROM Connexion WHERE Login = @login AND MotPasse = @pass";
SqlCeCommand cmd = new SqlCeCommand(req, cnx);
SqlCeParameter login = new SqlCeParameter("login", s1);
cmd.Parameters.Add(login);
SqlCeParameter pass = new SqlCeParameter("pass", s2);
cmd.Parameters.Add(pass);
BaseGmaoLocaleDataSet2 dat = new BaseGmaoLocaleDataSet2();
DataRow[] foundRows;
foundRows = dat.Tables["Connexion"].Select("Login like  '%" + s1 + "%' and MotPasse like '%" + s2 + "%'");
if (foundRows != null)
{
MessageBox.Show("Authentification réussie");
MenuP m = new MenuP();
m.Show();
}
else
{
MessageBox.Show("Login ou mot de passe incorrect veuillez réessayer");
}
}

It seems so difficult Smile | :)
Thanks for u contribution
GeneralRe: smart device Forms-Database Pin
O.Phil13-Apr-10 22:45
O.Phil13-Apr-10 22:45 
QuestionIDENT_CURRENT Pin
devvvy12-Apr-10 22:47
devvvy12-Apr-10 22:47 
AnswerRe: IDENT_CURRENT Pin
Pete O'Hanlon12-Apr-10 23:01
mvePete O'Hanlon12-Apr-10 23:01 
AnswerRe: IDENT_CURRENT Pin
Tim Yen13-Apr-10 3:04
Tim Yen13-Apr-10 3:04 
AnswerRe: IDENT_CURRENT Pin
PIEBALDconsult13-Apr-10 4:09
mvePIEBALDconsult13-Apr-10 4:09 
QuestionShow image on upload [modified] Pin
DX Roster12-Apr-10 21:53
DX Roster12-Apr-10 21:53 
AnswerRe: Show image on upload Pin
Gaurav Dudeja India13-Apr-10 1:23
Gaurav Dudeja India13-Apr-10 1:23 
GeneralRe: Show image on upload Pin
DX Roster13-Apr-10 4:21
DX Roster13-Apr-10 4:21 
QuestionODBC Connection Problem Pin
mjawadkhatri12-Apr-10 21:08
mjawadkhatri12-Apr-10 21:08 
AnswerRe: ODBC Connection Problem Pin
Abhinav S12-Apr-10 21:43
Abhinav S12-Apr-10 21:43 
GeneralRe: ODBC Connection Problem Pin
mjawadkhatri12-Apr-10 21:53
mjawadkhatri12-Apr-10 21:53 
GeneralRe: ODBC Connection Problem Pin
BoomRShine13-Apr-10 5:58
BoomRShine13-Apr-10 5:58 
AnswerRe: ODBC Connection Problem Pin
Rajesh Anuhya12-Apr-10 21:59
professionalRajesh Anuhya12-Apr-10 21:59 
AnswerRe: ODBC Connection Problem Pin
Som Shekhar12-Apr-10 22:52
Som Shekhar12-Apr-10 22:52 
AnswerRe: ODBC Connection Problem Pin
Morgs Morgan13-Apr-10 4:35
Morgs Morgan13-Apr-10 4:35 
AnswerRe: ODBC Connection Problem Pin
yu-jian15-Apr-10 6:41
yu-jian15-Apr-10 6:41 
Questionoledbdatareader Pin
sachees12312-Apr-10 20:40
sachees12312-Apr-10 20:40 

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.