PDA

View Full Version : مشکل دستور inner join



sorena2000
سه شنبه 21 مرداد 1393, 23:51 عصر
سلام دوستان کسی میدونه مشکل این کد چی هست ؟؟؟
بعد از اجراع این ارورر رو میده .
syntax error missing operator in query expression inner join

OleDbDataAdapter
da = new OleDbDataAdapter("select Tb_Warranty.IdWarranty,Tb_Warranty.Serial,Tb_Warra nty.Warranty," +
"Tb_Warranty.Difficulties,Tb_Warranty.Appurtenant,T b_Warranty.DateCome,Tb_Warranty." +
"Tb_Warranty.DateTamas,Tb_Warranty.DateErsal,Tb_War ranty.Follow," +
"Tb_Customer.Name + "' '"+ Tb_Customer.family as fullname ,Tb_Company.NameCompany,Tb_Product.Name " +
"from ((Tb_Warranty inner join Tb_Customer on Tb_Warranty.IdCustomer=Tb_Customer.IdCustomer)" +
"inner join Tb_Company on Tb_Warranty.IDCompany=Tb_Company.IDCompany )" +
"inner join Tb_Product on Tb_Warranty.IdProduct=Tb_Product.IdProduct ", con1);
DataSet ds = new DataSet();
da.Fill(ds, "Tb_Warranty");
DGVguarantee.DataSource = ds.Tables["Tb_Warranty"].DefaultView;
con1.Close();

Ali_Fallah
پنج شنبه 23 مرداد 1393, 17:30 عصر
فکر کنم این سوال رو باید در بخش #C مطرح کنی

sorena2000
جمعه 24 مرداد 1393, 15:55 عصر
ممنون دوست عزیز راه حل رو پیدا کردم

select Tb_Warranty.IdWarranty,Tb_Warranty.Serial,Tb_Warra nty.Warranty," + "Tb_Warranty.Difficulties,Tb_Warranty.Appurtenant,T b_Warranty.DateCome," + "Tb_Warranty.DateTamas,Tb_Warranty.DateErsal,Tb_War ranty.Follow," + "Tb_Customer.Name + ' '+ Tb_Customer.family as fullname ,Tb_Company.NameCompany,Tb_Product.Name " + " from (( Tb_Warranty INNER JOIN Tb_Customer on Tb_Warranty.IdCustomer=Tb_Customer.IdCustomer) " + "INNER JOIN Tb_Company on Tb_Warranty.IDCompany=Tb_Company.IDCompany )" + "INNER JOIN Tb_Product on Tb_Warranty.IdProduct=Tb_Product.IdProduct;"