使用 Delphi 2006 连接 ODBC 数据源的正确方法?
连接 ODBC 数据源并执行一些 SQL 语句的正确方法是什么?
TQuery 和其他 BDE 组件可以做到这一点,但如果我理解正确的话,它们现在已被弃用?
What's proper way to connect ODBC datasources and execute some SQL statements?
TQuery and other BDE components can do it, but if I understood correctly they are now deprecated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 ADO 组件:
1) 从 dbGo 选项卡中拖动 TAdoConnection。
2) 右键单击并选择编辑连接字符串。
3) 单击“构建”
4) 选择“Microsoft OLE DB Provider for ODBC”
5) 单击“下一步”
然后您将能够选择一个数据库。
您可以拖动 TAdoQuery 并将其连接到 TAdoConnection 以执行一些查询。
其余的应该是直接的。
You can use the ADO components:
1) Drag a TAdoConnection from the dbGo tab.
2) Right click and choose Edit connection string.
3) Click build
4) Select Microsoft OLE DB Provider for ODBC
5) Click Next
Then you will be able to select a database.
You can drag a TAdoQuery and connect it to the TAdoConnection to execute some queries.
The rest should be straight forward.
我想到的是 ADO(在 dbGo 组件组下)和 dbExpress(在 dbExpress 组件组下)。
ADO (under the dbGo components component group) as well as dbExpress (under the dbExpress component group) come to mind.