* * *

Author Topic: ANY guide to Lazarus Database Programming  (Read 4623 times)

IAM

  • Newbie
  • Posts: 4
ANY guide to Lazarus Database Programming
« on: July 30, 2010, 08:42:14 pm »
Is there any guide to Lazarus Database Programming like the "guide to Delphi Database (ADO) Programming" in this link

http://delphi.about.com/od/database/a/adodelphi.htm

?


How to access MS-Access DB? and How to do the basic operations such as insertion, deletion, searching, editing, ....etc  :o :o

clauslack

  • Sr. Member
  • ****
  • Posts: 264
Re: ANY guide to Lazarus Database Programming
« Reply #1 on: July 31, 2010, 01:38:05 am »
Check
http://wiki.lazarus.freepascal.org/ODBCConn

In control Panel ODBC-> User DSN , add Access database


Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
   with ODBCConnection1 do begin
      Connected:= False;
      DatabaseName:='farmacia';
      UserName:='';  //for MS SQL Server fill user and password
      Password:='';
      Connected:= True;
   end;
   with SQLQuery1 do begin
      close;sql.clear;
      sql.add('select * from medimentos');
   end;
   if SQLTransaction1.Active then SQLTransaction1.Commit;
   SQLTransaction1.StartTransaction;
   SQLQuery1.open;
end;                                 

Check
http://wiki.lazarus.freepascal.org/Databases

here an Database example with Firebird and SQLDb

http://www.lazarus.freepascal.org/index.php/topic,7246.msg34315.html#msg34315

IAM

  • Newbie
  • Posts: 4
Re: ANY guide to Lazarus Database Programming
« Reply #2 on: August 01, 2010, 02:52:53 am »
Check
http://wiki.lazarus.freepascal.org/ODBCConn

In control Panel ODBC-> User DSN , add Access database


Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
   with ODBCConnection1 do begin
      Connected:= False;
      DatabaseName:='farmacia';
      UserName:='';  //for MS SQL Server fill user and password
      Password:='';
      Connected:= True;
   end;
   with SQLQuery1 do begin
      close;sql.clear;
      sql.add('select * from medimentos');
   end;
   if SQLTransaction1.Active then SQLTransaction1.Commit;
   SQLTransaction1.StartTransaction;
   SQLQuery1.open;
end;                                 

Check
http://wiki.lazarus.freepascal.org/Databases

here an Database example with Firebird and SQLDb

http://www.lazarus.freepascal.org/index.php/topic,7246.msg34315.html#msg34315


very useful

Thanx clauslack

itsols

  • Newbie
  • Posts: 3
Re: ANY guide to Lazarus Database Programming
« Reply #3 on: October 09, 2010, 12:05:08 pm »
None of the wiki sites referred to above seem to work. Is there some error on the server?

xenblaise

  • Sr. Member
  • ****
  • Posts: 342
Re: ANY guide to Lazarus Database Programming
« Reply #4 on: October 18, 2010, 02:08:56 am »

xenblaise

  • Sr. Member
  • ****
  • Posts: 342
Re: ANY guide to Lazarus Database Programming
« Reply #5 on: October 18, 2010, 01:22:14 pm »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads