[C#] Trying some new Methods..
#5

Forgot all this i got a Fix but not really Logical..

 

Look this Class i marked where you should read ^^:

class Force
{
public Force()
{

Initialize();

}

public string Server;
private string UserID;
private string DB;
private string pw;

public void Initialize()
{
Form1 f1 = new Form1();
f1.Show(); // Here is the Fail, if i let it Open i can connect but if i dont include this it tells me the Error..
Server = f1.textBox1.Text;
UserID = f1.textBox3.Text;
DB = f1.textBox5.Text;
pw = f1.textBox4.Text;
}

public void MySql()
{

MySqlConnection con;
MySqlConnectionStringBuilder csb = new MySqlConnectionStringBuilder();
csb.Server = Server;
csb.UserID = UserID;
csb.Database =DB;
csb.Password = pw;
con = new MySqlConnection(csb.ConnectionString);
MySqlConnection connection = new MySqlConnection(csb.ConnectionString);
connection.Open();

}

}



Messages In This Thread
[No subject] - by Nikolee - 08-28-2012, 08:34 PM
[No subject] - by Wizatek - 08-28-2012, 09:47 PM
[No subject] - by HateMe - 08-29-2012, 01:44 AM
[No subject] - by HateMe - 08-29-2012, 01:53 AM
[No subject] - by Nikolee - 08-29-2012, 11:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)