D
Dakkar
I wrote my program like this and its using c# mysqldriver for
connecting mysql but after pushing the connet button im taking this
error
what must i do
Error:
File or assembly name 'MySQLDriverCS, Version=3.0.1735.36021,
Culture=neutral, PublicKeyToken=172f94dfb0faf263', or one of its
dependencies, was not found.
and my code is like this
[code:1:278b9f2036]
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using MySQLDriverCS;
public class baglanti : Form
{
private Button btn;
private TextBox text1;
private TextBox text2;
private Label label1, label2;
private RichTextBox txt1;
public baglanti()
{
String path = @"C:\Documents and
Settings\VampirHuma\My Documents\Visual
Studio\Projects\connector\connector\sylcn.jpg";
this.Size = new Size(400, 300);
this.Location = new Point(140, 200);
this.Text = "Sylveria Baglanti Programi";
this.BackgroundImage = new Bitmap(path);
this.MaximizeBox = false;
txt1 = new RichTextBox();
txt1.Size = new Size(100, 100);
txt1.Location = new Point(8, 160);
txt1.Text = "";
label1 = new Label();
label1.Text = "Kullanici Adi:";
label1.Size = new Size(70, 20);
label1.Location = new Point(8, 50);
label2 = new Label();
label2.Text = "Sifre:";
label2.Size = new Size(70, 20);
label2.Location = new Point(8, 75);
text1 = new TextBox();
text1.Size = new Size(100, 15);
text1.Location = new Point(80, 50);
text1.MaxLength = 20;
text2 = new TextBox();
text2.Size = new Size(100, 15);
text2.Location = new Point(80, 75);
text2.MaxLength = 20;
btn = new Button();
btn.Size = new Size(50, 25);
btn.Text = "Baglan";
btn.Location = new Point(8, 100);
btn.Click += new EventHandler(btn_clicked);
this.Controls.Add(label1);
this.Controls.Add(label2);
this.Controls.Add(text1);
this.Controls.Add(text2);
this.Controls.Add(txt1);
this.Controls.Add(btn);
}
public void sorgu(String u_name, String pw)
{
MySQLConnection Dbconn;
Dbconn = new MySQLConnection(new
MySQLConnectionString("localhost", "account",
"root", "root").AsString);
Dbconn.Open();
System.Data.DataTable dt = new MySQLSelectCommand(Dbconn,
new string[] { "username",
"password" }, new string[] {
"accounts" }, new object[,] { {
"username", "=", u_name } }, null,
null).Table;
if (dt.Rows.Count != 0)
{
txt1.Text = "Kullanici Adi ve Sifre
Dogrulandi";
}
else
{
txt1.Text = "Kullanici Adi veya Sifre Hatali";
}
}
public void btn_clicked(object ob, EventArgs e)
{
sorgu(this.text1.Text,this.text1.Text); //here the
error happens
}
public static void Main()
{
Application.Run(new baglanti());
}
}
[/code:1:278b9f2036]
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
connecting mysql but after pushing the connet button im taking this
error
what must i do
Error:
File or assembly name 'MySQLDriverCS, Version=3.0.1735.36021,
Culture=neutral, PublicKeyToken=172f94dfb0faf263', or one of its
dependencies, was not found.
and my code is like this
[code:1:278b9f2036]
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using MySQLDriverCS;
public class baglanti : Form
{
private Button btn;
private TextBox text1;
private TextBox text2;
private Label label1, label2;
private RichTextBox txt1;
public baglanti()
{
String path = @"C:\Documents and
Settings\VampirHuma\My Documents\Visual
Studio\Projects\connector\connector\sylcn.jpg";
this.Size = new Size(400, 300);
this.Location = new Point(140, 200);
this.Text = "Sylveria Baglanti Programi";
this.BackgroundImage = new Bitmap(path);
this.MaximizeBox = false;
txt1 = new RichTextBox();
txt1.Size = new Size(100, 100);
txt1.Location = new Point(8, 160);
txt1.Text = "";
label1 = new Label();
label1.Text = "Kullanici Adi:";
label1.Size = new Size(70, 20);
label1.Location = new Point(8, 50);
label2 = new Label();
label2.Text = "Sifre:";
label2.Size = new Size(70, 20);
label2.Location = new Point(8, 75);
text1 = new TextBox();
text1.Size = new Size(100, 15);
text1.Location = new Point(80, 50);
text1.MaxLength = 20;
text2 = new TextBox();
text2.Size = new Size(100, 15);
text2.Location = new Point(80, 75);
text2.MaxLength = 20;
btn = new Button();
btn.Size = new Size(50, 25);
btn.Text = "Baglan";
btn.Location = new Point(8, 100);
btn.Click += new EventHandler(btn_clicked);
this.Controls.Add(label1);
this.Controls.Add(label2);
this.Controls.Add(text1);
this.Controls.Add(text2);
this.Controls.Add(txt1);
this.Controls.Add(btn);
}
public void sorgu(String u_name, String pw)
{
MySQLConnection Dbconn;
Dbconn = new MySQLConnection(new
MySQLConnectionString("localhost", "account",
"root", "root").AsString);
Dbconn.Open();
System.Data.DataTable dt = new MySQLSelectCommand(Dbconn,
new string[] { "username",
"password" }, new string[] {
"accounts" }, new object[,] { {
"username", "=", u_name } }, null,
null).Table;
if (dt.Rows.Count != 0)
{
txt1.Text = "Kullanici Adi ve Sifre
Dogrulandi";
}
else
{
txt1.Text = "Kullanici Adi veya Sifre Hatali";
}
}
public void btn_clicked(object ob, EventArgs e)
{
sorgu(this.text1.Text,this.text1.Text); //here the
error happens
}
public static void Main()
{
Application.Run(new baglanti());
}
}
[/code:1:278b9f2036]
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*