Forum > Arabic

مشكلة في استعلام sql

(1/1)

Gebo:
أنا بنفذ بكون استعلام sql ولكن لا تأتي بسجل واحد
فما هو السبب

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  SQLQuery1.Close;  ODBCConnection1.Close();  SQLQuery1.SQL.Text:='select weight,meter,lot,user,rolldate,colors.col_code,cloth.cloth_code from recorded_rolls inner join cloth on cloth.id=recorded_rolls.type_cloth inner join colors on colors.id=recorded_rolls.roll_color where ';   if Trim(DBLookupComboBox1.Text) <> '' then    SQLQuery1.SQL.Add('recorded_rolls.roll_color ='+DBLookupComboBox1.KeyField+' and ');   if Trim(DBLookupComboBox2.Text) <> '' then    SQLQuery1.SQL.Add('recorded_rolls.type_cloth= '+DBLookupComboBox2.KeyField+' and ');   //فحص حقل الوزن وإضافته لكود sql  if Trim(Edit1.Text) <> '' then    SQLQuery1.SQL.Add('recorded_rolls.weight = '+Edit1.Text+' and ');   //فحص حقل طول الرول وإضافته لكود sql  if Trim(Edit2.Text) <> '' then    SQLQuery1.SQL.Add('recorded_rolls.meter = '+Edit2.Text+' and ');   SQLQuery1.SQL.Add('recorded_rolls.rolldate between '+DateToStr(DateTimePicker1.Date)+' and '+DateToStr(DateTimePicker2.Date)+' and ');  SQLQuery1.SQL.Add('1=1');  SQLQuery1.Open;

nouzi:
ماهي نتيجة الاستعلام عند تنفيده مباشرة على محرك قواعد المعطيات ؟
حول أستعمل FieldByName يكون الامر افضل

Navigation

[0] Message Index

Go to full version