File: README.txt

package info (click to toggle)
lazarus 2.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 214,460 kB
  • sloc: pascal: 1,862,622; xml: 265,709; cpp: 56,595; sh: 3,008; java: 609; makefile: 535; perl: 297; sql: 222; ansic: 137
file content (23 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.
As a courtesy, FreePascal has a downloadable version for Windows at:
ftp://ftp.freepascal.org/fpc/contrib/windows/

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