Hi

My DBGrid was working fine until I used the field editor to add/delete fields in the SQLQuery1 dataset. After that i can seen the records only in design mode, but when I run the program., dbgrid shows no data.

The following is my query component.
------------------------------------------------------------------------------------------------------------------------

object SQLQuery1: TSQLQuery
 Active = True
 AutoCalcFields = True
 Database = MySQL41Connection1
 Transaction = SQLTransaction1
 SQL.Strings = (
'select * from purchorders p,suppliers s where p.supplierno=s.supplierid'
 )
IndexDefs = < item end item end item end item end item
   end>
 Params = <>
 UpdateMode = upWhereKeyOnly
 UsePrimaryKeyAsKey = True
 StatementType = stSelect
 ParseSQL = True
 left = 43
 top = 38
 object SQLQuery1orderno1: TLongintField
   AlignMent = taRightJustify
   DisplayWidth = 10
   FieldName = 'orderno'
   ProviderFlags = [pfInUpdate, pfInWhere]
 end
 object SQLQuery1supplierno1: TStringField
   DisplayWidth = 10
   FieldName = 'supplierno'
   Index = 1
   ProviderFlags = [pfInUpdate, pfInWhere]
   Size = 10
 end
 object SQLQuery1orddate1: TDateTimeField
   DisplayWidth = 10
   FieldName = 'orddate'
   Index = 2
   ProviderFlags = [pfInUpdate, pfInWhere]
 end
 object SQLQuery1rate1: TFloatField
   AlignMent = taRightJustify
   DisplayWidth = 10
   FieldName = 'rate'
   Index = 3
   ProviderFlags = [pfInUpdate, pfInWhere]
   Precision = -1
 end
 object SQLQuery1initiator1: TStringField
   DisplayWidth = 15
   FieldName = 'initiator'
   Index = 4
   ProviderFlags = [pfInUpdate, pfInWhere]
   Size = 15
 end
 object SQLQuery1requisitionno1: TStringField
   DisplayWidth = 15
   FieldName = 'requisitionno'
   Index = 5
   ProviderFlags = [pfInUpdate, pfInWhere]
   Size = 15
 end
 object SQLQuery1supplierid1: TStringField
   DisplayWidth = 10
   FieldName = 'supplierid'
   Index = 6
   ProviderFlags = [pfInUpdate, pfInWhere]
   Size = 10
 end
 object SQLQuery1suppname1: TStringField
   DisplayWidth = 40
   FieldName = 'suppname'
   Index = 7
   ProviderFlags = [pfInUpdate, pfInWhere]
   Size = 40
 end
end


regards

Nataraj
begin:vcard
fn:http://www.gsis.ac.in
n:S Narayan;Nataraj
org:Good Shepherd International School;Software
adr:Niligiris, ;;M.Palada;Ootacamund;TN;643004;INDIA
email;internet:[EMAIL PROTECTED]
title:Project Coordinator
tel;work:0423 2550371 - 307
x-mozilla-html:TRUE
url:http://www.gsis.ac.in
version:2.1
end:vcard

Reply via email to