[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

Bo Berglund bo.berglund at gmail.com
Tue Jan 25 00:26:01 CET 2011


On Tue, 25 Jan 2011 00:04:27 +0100, "Dipl. Phys. Jörg Schläger"
<js at jsdevelop.de> wrote:

>I used the following code in progs compiled with
>delphi 5, delphi7 and delphi 2007 with winxp sp1 to win 7
>with MSsql2000 and MSsql2005 without problem
>
>  Listbox1.Clear;
>  Query1.sql.Clear;
>  Query1.sql.add('exec Aufnahme.dbo.L_Stat_Allgemein');
>  Query1.open;
>  while not Query1.eof do
>    begin
>    Listbox1.Items.Add(Query1.findfield('GSJ').AsString + ' - ' + Query1.findfield('Statistik').AsString );
>    Query1.Next;
>    end;
>  Query1.Close;
>
>exists  query.updatemode  in lazarus ? then it should be upWhereAll, because the exec or execute has no key
>
>next switch on logging odbc 
>and a diff of two logs between delphi prog and lazarus prog with one query with exec

Can you please specify which ODBC database components you used in
Delphi 7??
For example what is the type of Query1?
And if it needs a database connection component to work, what is that?

Please post your complete test code.

As I said I never used ODBC with Delphi, so I would need to know which
component to use to do that test. I have installed Delphi7 on this PC
too, but straight out of the box (CD)...



-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list