From: Paul H. <pa...@on...> - 2001-10-16 18:22:24
|
Hi I am using ADO to talk to the IB6 database. I am using the latest ODBC driver and have encountered an error. When I save (via ADO I do the INSERT statement) to the db and check with IBconsole, I can prove that my number (say) 4.23 is actually saved as 4.23. But when I read the data field I get 423. I can confirm that this is an error because I have run the same program against IB5.* database using the Visigenic driver and I always get back 4.23. I am using ADO downloaded from MS dated July 10 2000 and am using the latest ODBC driver 2001 07 11. Clearly no one has this problem except me so it must be something I have done wrong, wrong, wrong.... Below is the Delphi code that I use. If anyone has a suggestion, please let me know. My clients are VERY interested to get the correct results... thanks ---------------------------------------------- procedure TADODatabase.getresultset(TheRecordset: recordset; recordsetIndex: integer; TheHelper: tadoDBHelper); var index : integer; thecommandStr : string; begin try frowsfound:=0; with TheHelper do begin clearOutputData(recordSetIndex); AreRowsAvailable:=false; theRecordSet.movefirst; while not(theRecordset.eof) do begin inc(frowsfound); for index:=0 to outputfieldnamecount(recordSetIndex)-1 do begin if VarIsNUll(theRecordset.fields[index].value) then setOutputRowEntry(recordSetIndex,frowsfound-1,index,'null') else setOutputRowEntry(recordSetIndex,frowsfound-1, index, theRecordset.fields[index].value); end; theRecordSet.moveNext; if assigned(fcountOfRowsProcess) then fcountOfRowsProcess(frowsfound); end; if frowsfound>-1 then areRowsAvailable:=true; ResultSetcount:=recordSetIndex; end; except processError('getresultSet',thecommandstr); raise; end; end; |