[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?
Bo Berglund
bo.berglund at gmail.com
Tue Jan 25 19:00:33 CET 2011
On Mon, 24 Jan 2011 23:29:41 +0100, Bo Berglund
<bo.berglund at gmail.com> wrote:
>>
>>>From testing with MS-Access and MySQL I know that ODBC works fine with other
>>databases, at least for SELECT Statements.
>>
>>1. Can you test a regular SELECT statement on the same SQL database ?
>> If that doesn't work either, we know the problem is in the ODBC connection component.
>
works fine with SELECT
>
>>2. Can you test the same EXEC statement in a Delphi app through ODBC ?
>> If this gives problems, it means the ODBC driver is well - weird.
>> (although this would surprise me)
>
I now repeated the same simple application code in Delphi7 where I
used a TADOConnection and a TADOQuery component to execute the
queries.
I used the same ODBC datasource as had been used by the lazarus
program and this time all 4 records were correctly retrieved.
>
>
>>3. If both previous attempts work, there is nothing left but to debug the ODBC connection component.
>> That means stepping through your code with the debugger.
>>
No need since the ODBC connection is OK proven by the Delphi program.
Now only remains to check why the sqldb component does not see all
returned records when the verb is EXEC. It does see them if the asq is
a select statemant exactly the same as the stored procedure
executes...
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list