Hi, is it someone who knows how to make a login system wich uses mysql? :S
NEEED HELP!

Please @eoop.org, ask a specific question.

i think this what you need? this not mySQL so revise it. lolz... well atleast there's a reference.. :v

private void Lgbtn_Click(object sender, EventArgs e)
        {
            OleDbConnection conn = new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\Anakz\My Documents\PDG.mdb");
            OleDbCommand cmd = new OleDbCommand("SELECT Username,Password,age FROM Users", conn);
            OleDbDataReader reader;
            bool permit = false;
          
            try
            {
                conn.Open();
                reader = cmd.ExecuteReader();

                while (reader.Read())
                {
                    if (textBox1.Text == (reader["UserName"].ToString()) && textBox2.Text == reader["PassWord"].ToString())//this is where its going to compare your user and password in your database..
                    {
                     
                        
                        permit = true;
                        break;
                    }
                   
                }
            }



            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            if (permit == true)
            {

                this.Close();
                MessageBox.Show("access granted");

               
                
            }


            else
            { MessageBox.Show("access denied"); }
        }

What exactly do you mean with "make a login system"?
isnt kapojian`s solution ok?
What exactly do you want?

What you need is a connection string to succesfully connect to database, its structure, to knnow the table names and their fields, so you are able with a help of query statement get appropriate data back out --> to get username and password, and check if they exiast and if they suit to each other.
What else do you need?

Please explain,
thx in advance,
bye

I want to login by using a mysql(online), in c#.
I want to make a table: username - password
The software will get data from the database ;)

So this thread is solved then, kapojan spoon fed you the answer. Although I highly recommend not passing passwords around the internet unencrypted.

People on daniweb don't usually like to completely solve your problem for you. Usually it is a good idea to do as much research as you can then post your code (primarily the aspects that are not working) and we will all happily point out ways to troubleshoot it/improve it.

But i want to use a MYSQL
Online, that one you made is only for microsoft sql ;)

But i want to use a MYSQL
Online, that one you made is only for microsoft sql ;)

Google might be of assistance to you.

Well, i did not find good results on google, that is why i am asking on daniweb -.-

the answer is already there.. if you know how to use MYSQL you can change my code to mysql. well, if you dnt know how to use mySQL, better study it first. ;)

I did not get:

OleDbConnection conn = new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\Anakz\My Documents\PDG.mdb");

Well, i did not find good results on google, that is why i am asking on daniweb -.-

Hahaha I find that funny, since the link is a link to results explaining that exact problem (Microsoft sql to MySql)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.