************** DBExpress for sqlite ***********(30分)

  • 主题发起人 主题发起人 zqssoft
  • 开始时间 开始时间
Z

zqssoft

Unregistered / Unconfirmed
GUEST, unregistred user!
如何用DBExpress连接sqlite?<br>按照网上说的,下载安装sqlite dbexpress driver后。竟然连接不成功。到底怎么安装sqlite dbexpress driver呢,按其说明,改写dbxdrivers.ini后,还是不行。<br>请问:为什么这个控件的说明只让改写dbxdrivers.ini,而却没有改写dbxconnections.ini文件的说明呢。到底是怎么改写dbxconnections.ini,才能安装成功啊。急!<br><br>Installation of DbxSQLite.dll<br>----------------------------------------------------<br><br>1 Locate the dbxdrivers.ini on your computer.<br>2 Add the following lines to it:<br><br>&nbsp; [Installed Drivers]<br>&nbsp; SQLite=1<br><br>&nbsp; [SQLite]<br>&nbsp; LibraryName=C:/..../DbxSQLite.dll<br>&nbsp; GetDriverFunc=getSQLDriverSQLite<br>&nbsp; VendorLib=C:/..../sqlite.dll<br>&nbsp; RoleName=Cache=2000|TextLength=1024<br><br>3 Fire up Delphi<br>4 Add a TSqlConnection component<br>5 Set the DriverName to "SQLite"<br>6 Open the component editor ("Edit connection<br>&nbsp; properties")<br>7 Create a new connection and set the Database to a<br>&nbsp; file (If you don't have a file it will be created<br>&nbsp; upon connecting)<br>8 Create some ClientDataSet structure<br>&nbsp; enter your SQL and build your applications<br><br>For support mail me at: sqlite@wobben.com<br>or use the sqlite@yahoogroups.com maillist.<br><br>----------------------------------------------------<br>&nbsp; Notes<br>----------------------------------------------------<br><br>When having trouble always use the SQLMonitor to see<br>what is happening within the DbxSQLite driver.<br><br>Since SQLite is typeless and everything is stored<br>as text the following DataTypes are parsed and<br>supported:<br>- CHAR, VARCHAR, TEXT, GUID, BIT<br>&nbsp; Special characters are encoded using &amp;xx; values.<br>&nbsp; Where the xx is the hexadecimal representation.<br>- DATE, TIME, DATETIME, TIMESTAMP<br>&nbsp; Encodings are following the rules yyyymmdd for<br>&nbsp; date and hhnnsszzz for time.<br>- NUMERIC, DECIMAL, DOUBLE<br>- BLOB, BYTES, VARBYTES<br>&nbsp; Binary to hex notation and back is performed.<br>- BOOLEAN, BOOL<br>&nbsp; Stored as 0 or 1.<br>- INTEGER, SMALLINT<br>&nbsp; Smallint is 16bit integer and Integer is a 32bit<br>&nbsp; integer.<br><br>Large text fields are not converted to blobs; this<br>is typical BDE behaviour to convert text datatypes<br>larger than 255 characters as memo blobs. You may<br>override this behaviour to be identical to the BDE<br>by setting BdeBlobText=True.
 
[Installed Drivers]<br>&nbsp; SQLite=1<br><br>&nbsp; [SQLite]<br>&nbsp; GetDriverFunc=getSQLDriverSQLite3<br>&nbsp; LibraryName=DbxSQLite3.dll<br>&nbsp; VendorLib=sqlite3.dll<br>&nbsp; Database=database.db<br>&nbsp; RoleName=<br>&nbsp; Cache=2000<br>&nbsp; TextLength=1024
 
接受答案了.
 

Similar threads

A
回复
0
查看
943
Andreas Hausladen
A
A
回复
0
查看
994
Andreas Hausladen
A
A
回复
0
查看
623
Andreas Hausladen
A
A
回复
0
查看
820
Andreas Hausladen
A
后退
顶部