السلام عليكم
المشكله كما في العنوان
لااعلم لماذا يطلب مني اليوزر نيم والباسورد مع العلم ان الداتا بيز لايوجد عليها باسورد اساساً وهي من نوع اكسيس
وهذي محاولتي
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
if (Mobile != string.Empty)
{
TraderCopy tc = new TraderCopy();
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\\Trading.mdb");// |DataDirectory|\\Trading.mdb");
conn.Open();
OleDbCommand commCamise = new OleDbCommand();
commCamise.CommandText = "Select * from Camise where Phone ='" + Mobile + "' and Rec = " + Convert.ToInt32(RecCamise);
commCamise.Connection = conn;
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = commCamise;
DataSet1 ds = new DataSet1();
ds.Clear();
da.Fill(ds, "Camise");
OleDbCommand commJacket = new OleDbCommand();
commJacket.CommandText = "Select * from Jacket where Phone = '" + Mobile + "' and Rec = " + Convert.ToInt32(RecJacket);
commJacket.Connection = conn;
da.SelectCommand = commJacket;
da.Fill(ds, "Jacket");
OleDbCommand commPant = new OleDbCommand();
commPant.CommandText = " Select * from Pant where Phone = '" + Mobile + "' and Rec = " + Convert.ToInt32(RecPant);
commPant.Connection = conn;
da.SelectCommand = commPant;
da.Fill(ds, "Pant");
OleDbCommand commCustomer = new OleDbCommand();
commCustomer.CommandText = "Select * from Customer Where Mobile_Number ='" + Mobile + "'";
commCustomer.Connection = conn;
da.SelectCommand = commCustomer;
da.Fill(ds, "Customer");
tc.SetDataSource(ds);
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.UserID = "Admin";
crConnectionInfo.Password = "";
crConnectionInfo.AllowCustomConnection = false;
crConnectionInfo.DatabaseName = Application.StartupPath + "Trading.mdb";
crConnectionInfo.ServerName = Application.StartupPath + "Trading.mdb";// "localhost";
Tables crTables = tc.Database.Tables;
for (int j = 0; j < crTables.Count; j++)
{
Table crTable = crTables[j];
TableLogOnInfo crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
crystalReportViewer1.ReportSource = tc;
conn.Close();
}هل يوجد خطاء

