lazarus/examples/mssql
mattias b44975314e examples: mssqlconn: requires fpc 2.6.1
git-svn-id: trunk@38142 -
2012-08-04 10:15:31 +00:00
..
dbform.lfm
dbform.pas
dbloginform.lfm
dbloginform.pas
mssqlconnsample.lpi
mssqlconnsample.lpr
README.txt

Example program for the MS SQL Server and Sybase connectors in Lazarus.


These connectors require the FreeTDS shared library (dblib.dll/.so/.dylib), which at least on Windows requires libiconv2.dll for UTF8 support.
These can be downloaded via www.freetds.org and are provided by a lot of Linux distributions.

The program will ask you for a database type (Sybase or MS SQL Server), username, password, server etc. and then connect.
Then it will query the server for database server information and show the results in a dbgrid.

It demonstrates:
- enabling/disabling connections in code
- getting database data into a dbgrid
- using modal forms
- getting combobox values
- handling database errors
- terminating a program

Works for me on Windows Lazarus/FPC trunk x86.

More databae functionality and techniques are shown in the LazDataDesktop project in the <lazarusdir>\tools\LazDataDesktop directory.
Reinier Olislagers, 31 March 2012