Borland c++ builder with database

robber88 2000-02-28 09:19:00
Hello all in this group!

I am newbie of BCB4.0, I hope someone can help me here.

I have a from named frmMain, would like to call a DLL, this DLL is used for get data(s) from a Table, and show the data(s) in edit box on frmMain.

How do I add the datasource and table components in a DLL (DLL do not have a form so I cannot use visual method to add them)...

Please advise me how do I write code to define my existing table, then let me to get data from my existing table?
...全文
228 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
halfdream 2000-06-02
  • 打赏
  • 举报
回复
在DLL 为什么不能用FORM呢?如果不想用FORM就象alexela 说的那样用个
数据模块也可以。因为这样可以可视化编辑它, 比较方便。
不过,因为是DLL, 必须通过定义导出的函数 创建FORM或数据模块的类实例。

就算不用这些也行啊。
定义这些类的几个全局指针变量,直接在几个函数里创建这些对象,设置它们的属性,
设置它们的事件,尽管不能可视化,不过还是很容易。

alexela 2000-06-01
  • 打赏
  • 举报
回复
create a function to call a database.you can use moduledata (it's a unvisual component.you palce all your database and table in the module) for this but.OR ,you can add some code in program to create a database or table when running!
wish you succed!
any problem,e me please:alexela_2000@sina.com
guo 2000-03-01
  • 打赏
  • 举报
回复
朋友,虽然在DLL中不便包含FORM(根据你的需求也不需要包含FORM),做一个函数,使其返回TDATASOURCE类型的结果,然后通过手工将TDBEditBox的DataSource属性与其相连即可。
radish 2000-02-28
  • 打赏
  • 举报
回复
try custerdata unit.

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧