怎么使用?包括连接,第三方控件使用,简要介绍等等,请高手们赐教!
解决方案 »
- delphi查找窗体句柄,显示窗体问题
- 为什么有时候出错,有时候不出错啊?大家帮我看一下(关于Excel)
- 请教:如何指dbgrid的某一列得到焦点(setfocus)?
- 何时建立类,何时建立记录???
- 问一个关于QReport的简单常识性问题,20分一句话
- fastreport怎么打印一个dbgrid中的内容?
- 在DELPHI程序中加入背景音乐,MP3的音乐或是FLASH音乐。程序执行时就可以听到给定的MP3音乐,可执行的EXE文件中含有MP3音乐。就像在DELPH
- 菜鸟提问:请教诸位前辈,怎样能更快的学好delphi
- 修改主键的值会出错
- 小没用照片做了个屏保,可是&^%^$#@^$%$^&*$##,各位大哥,帮帮忙吧!!! --BaiYuJing
- 如果从串口读到的是十六进制的数据,如何快速转换成字符型保存到文件。
- 怎么在delphi中运用时务处理
关于firebird,用dexpress可以连接,但是数据集提示无表错误
ODBC
So far, I have not gotten ODBC to work using an Interbase ODBC driver with the Firebird Server.In order to access an *.gdb (or *.fdb) file, * Add these components - KADaoDatabase, KADaoTable, DataSource, DBGrid
* Set KADaoTable1.Database to KADaoDatabase1
* Set DataSource1.DataSet to KADaoTable1
* Set DBGrid1.DataSource to DataSource1 I got lots of errors related to the Workgroup information file, but, of course, there is no help on what that may mean. KADaoDatabase1.UserName sysdba
KADaoDatabase1.Password masterkey
KADaoDatabase1.DatabaseType ODBC
KADaoDatabase1.Database Select from the list of ODBC or BDE database aliases. (I am assuming that your system has at least one defined.) Setting this clears Database1.DatabaseName.
KADaoDatabase1.DatabaseName This is the name that TTable components will link to. This can be the same as Database1.AliasName, you may make up a name, or you may enter the fully qualified path to a Paradox database (directory). An MS Access mdb file can not be entered here.
KADaoDatabase1.LoginPrompt Set this False to disable the default dialog box.
KADaoDatabase1.OnLogin Attaching code to this event will also disable the default dialog box. (Hardcoding userID's and passwords is considered to be a security problem.)
Using the Interbase Components
In order to access an *.gdb file, * Add these components - IBDatabase, IBTransaction, IBTable, DataSource, DBGrid IBDatabase1.DatabaseName Set this to the *.gdb or *.fdb file
IBDatabase1.Connected Set to true
IBTransaction1.DefaultDatabase Set to IBDatabase1
IBTransaction1.DefaultAction Set to TACommit
IBTransaction1.Active Set to true
IBTable1.Database Set to IBDatabase1
IBTable1.Transaction Set to IBTransaction1
IBTable1.TableName Select a table from the list.
IBTable1.Active Set to true
DataSource1.DataSet Set to IBTable1
DBGrid1.DataSource Set to DataSource1 Be sure not to set IBTable1.MasterSource to DataSource1 - if you do, you get the following errorCircular datalinks are not allowed.Instead of IBTable, you can use IBDataSet and set SelectSQL toselect * from CUSTOMEROr you can use IBClientDataSet and set CommandText to the query.
dbExpress is Borland's new way to connect to SQL databases - supposedly, only one additional *.dll (dbexpint.dll) is required on the client systems in order to connect to an Interbase/Firebird database. (Well, that's what the documentation says.)(dbExpress is available with Delphi 6 Pro and Delphi 7 Pro, but not with Delphi 5 Pro.)The first problem is that dbExpress produces a link to a "unidirectional" database - this causes the DataGrid to not work. The solution with Delphi 6 was to use a TClientDataSet which buffers data in memory so that bidirectional access is simulated.It turns out that Delphi 7 requires an additional TProvider component.It was also not clear from the documentation how to configure the TClientDataSet. The solution is to set xx to one of these - table, query, storedProc - and to set xx to an appropriate value.Well, I eventually got this to work. Then I tried to get the *.exe to run on a machine that did not have Delphi 7 installed. * I never got it to work on another Windows 98 system EIntfCastError - Interface not supported * On Windows XP, I had to supply the following *.dll's - luckily, the error boxes told me what was missing.dbexpint.dll DBExpINT.dcu midas.dll Notice - Delphi 6 does not require the xxx component. That means that code written for Delphi 6 must be modified before it will compile with Delphi 7.
下载 FireBird 把 bin 里的 fbclient.dll 复制成 gds32.dll 放到 Winnt\System32 下。
在 dbExpress 中用 InterBase 的驱动。就可以连接了 (数据库为:127.0.0.1:<数据库别名>)。最好再下一个 FireBird Control Center (方便别名管理)
再下一个 IBExpert (建表、建库)。