delphi中的Dll数据模块?

发布于 2024-07-27 15:33:49 字数 150 浏览 1 评论 0原文

我创建了一个有问题的数据库程序。 我使用 Borland Delphi 7.x

我的问题是

如何使用 Delphi 在 Dll(动态链接库)中创建数据模块?

I created a database program which has a problem.
I used Borland Delphi 7.x

My Question is

"How to create a data module in Dll (Dynamic Link Library) With Delphi?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

牵强ㄟ 2024-08-03 15:33:49

您可以从数据模块创建代码,就像在普通应用程序中一样。
文件|新建|数据模块

但我猜测您想在 DLL 中创建数据模块的实例。

DataModule 与其他类和组件没有什么不同,并且可以在代码中创建。

var
  DM : TMyDataModule;
begin
  DM := TMyDataModule.Create(nil); 
  try
 // Then...   DM.MyDataSet.First; etc...
  finally
    DM.Free; 
  end;
end;

You can create the code from the data module, just like you would in a normal application.
File|New|Data Module

But I am guessing that you want to create an instance of a data module in a DLL.

DataModules are no different other classes and components, and can be created in code.

var
  DM : TMyDataModule;
begin
  DM := TMyDataModule.Create(nil); 
  try
 // Then...   DM.MyDataSet.First; etc...
  finally
    DM.Free; 
  end;
end;
场罚期间 2024-08-03 15:33:49

在 IDE 中打开 DLL 项目。 在“文件|新建”菜单下,您是否看到“数据模块”选项?

Open your DLL project in the IDE. Under the File|New menu, do you see an option for Data Module?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文