打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Delphi connection to Sqlite with Zeos ~ About Everything

Delphi connection to Sqlite with Zeos

Posted by Rahman M On Friday, August 10, 20123comments
There are many Delphi components that can be used to interact with sqlite, one of the most popular is the ZEOS. It can be used for sqlite, ZEOS also be used to interact with some of the big servers like Oracle, MySQL, PostgreSQL and many more.

download first sqlite3.dll here and place it on the main project folder.







you can download the latest version of ZEOS here.
I assume you've installed ZEOS in delphi. here I am using Delphi 2009.
Now open your Delphi and create a new project and add components ZEOS,
TZConnection and TZQuery like this picture below. 

 

 






double-click on the event onActivate Form1 and insert the following code.

procedure TForm1.FormActivate(Sender: TObject);
begin
ZConnection1.Protocol:='sqlite-3';
ZConnection1.Database:=ExtractFilePath(Application.ExeName) + '\coba.sdb';
ZConnection1.Connect;

//check connection
if ZConnection1.Connected=true then
begin
  Application.MessageBox('connection successfully done','Checking connection',MB_ICONINFORMATION);
end
else
  Application.MessageBox('connection failed','Checking connection',MB_ICONSTOP);
end;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
lazarus创建sqlite数据库
Unity 3D + Android + SQLite Examples | Unity Community
delphi 获得外部程序焦点
Delphi显示确认框
Delphi中Create(nil),Create(self),Create(Application)区别
delphi中登录界面关闭直接现实主界面是怎么回事?
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服