open database my database >Local oConnection As 'ADODB.connection' >oConnection = Newobject("adodb.connection") > >With oConnection > .ConnectionString = ; > 'Provider=VFPOLEDB.1;Data source=d:\cetin\ddrive\temp\data\testdata.dbc;' > .Open > >* Here we set compatibility to 70 >* and can execute our meaningless group by > > .Execute("SET ENGINEBEHAVIOR 70") >endwith > >goapp.myreportmanagerexecutioncodes() >>
SPACKINGLISTITEMS:SQL: GROUP BY clause is missing or invalid.>>>>>
SELECT * FROM lv_LKsPackingListInvoice WHERE iPID = :iID>>>>>
>>>>Local oConnection As 'ADODB.connection' >>>>oConnection = Newobject("adodb.connection") >>>> >>>>With oConnection >>>> .ConnectionString = ; >>>> 'Provider=VFPOLEDB.1;Data source=d:\cetin\ddrive\temp\data\testdata.dbc;' >>>> .Open >>>> >>>> oRs = .Execute("select * from customer") >>>> ShowMe('Customer list', oRs) >>>> >>>> >>>>* Group by at its most meaningless form :) >>>>* Versions prior to VFP8 allowed this >>>>* You'd get the error - simply ignore to continue >>>> >>>> oRs1 = .Execute("select * from customer group by cust_id") >>>> If Type('oRS1') = 'O' >>>> ShowMe('Customer list', oRs1) >>>> Endif >>>> >>>>* Here we set compatibility to 70 >>>>* and can execute our meaningless group by >>>> >>>> .Execute("SET ENGINEBEHAVIOR 70") >>>> oRs2 = .Execute("select * from customer group by cust_id") >>>> If Type('oRS2') = 'O' >>>> ShowMe('Customer list', oRs2) >>>> Endif >>>> >>>> .Close >>>>Endwith >>>> >>>>Function ShowMe >>>> Lparameters tcCaption,toRecordset >>>> oForm = Createobject('myForm', tcCaption,toRecordset) >>>> oForm.Show >>>> Read Events >>>>Endfunc >>>> >>>>Define Class myform As Form >>>> Height = 450 >>>> Width = 750 >>>> Name = "Form1" >>>> >>>> Add Object hflex As OleControl With ; >>>> Top = 10, Left = 10, Height = 430, Width = 730, Name = "Hflex", ; >>>> OleClass = 'MSHierarchicalFlexGridLib.MSHFlexGrid' >>>> >>>> Procedure Init >>>> Lparameters tcCaption,toRecordset >>>> This.Caption = tcCaption >>>> This.hflex.Datasource = toRecordset >>>> Endproc >>>> Procedure QueryUnload >>>> Clear Events >>>> Endproc >>>>Enddefine >>>>Cetin