如何让用户无需任何配置即可连接远程数据库 [英] how to have user connect remote database without any configure

查看:85
本文介绍了如何让用户无需任何配置即可连接远程数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过ADO数据库程序完成远程数据库连接.

how to via ADO database program to accomplish remote database connection .

推荐答案

一个神秘的问题-如果您提供更多详细信息,将会有所帮助.

如果使用的是ODBC,则可以使用与位于本地计算机上的数据源相同的方式远程驻留的数据源.在利用ODBC的C ++程序中,数据库的位置是完全透明的.

您可以使用以下方式以编程方式配置数据源:
A cryptic question - it would help if you provide some more detail.

If you are using ODBC, you can use a data source that resides remotely in the same way as one that resides on the local computer. In C++ program that utilizes ODBC the location of database is totally transparent.

You can configure data source programatically using something like:
SQLConfigDataSource(NULL,ODBC_ADD_DSN, "Excel Files (*.xls)",
                   "DSN=New Excel Data Source\0"
                   "Description=New Excel Data Source\0"
                   "FileType=Excel\0"
                   "DataDirectory=Q:\\EXCELDIR\0"
                   "MaxScanRows=20\0");



Q:可能是一个远程位置



Where Q: could be a remote location


这篇关于如何让用户无需任何配置即可连接远程数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆