通过ODBC连接使用注册表项 [英] Using Registry key over ODBC connection

查看:193
本文介绍了通过ODBC连接使用注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


谁能让我知道在连接数据库方面哪一个更有利.使用ODBC连接或使用系统注册表中的连接字符串.
还需要从VB6代码连接到注册表的任何特殊管理权限吗?

预先感谢,
Sreeram Rengarajan

Hi,
Can anyone let me know which one is more advantageous in connecting to the database. Using an ODBC connection or using a connection string from system registry.
Also is there any special administrative rights required to connect to registry from the VB6 code?

Thanks in advance,
Sreeram Rengarajan

推荐答案

您仍然不了解ODBC的含义. ODBC只是访问数据库的一种接口.这些接口中的每一个都需要特定的连接字符串,其中包含有关用户和数据库位置的信息.
您可以在要使用的系统注册表上放置不同类型的不同接口的连接字符串类型(ODBC,OLEDB等).

由于现在是2010年,您应该改用OLEDB,除非您要连接的数据库仅支持ODBC.

您可能需要读取注册表的权限,具体取决于注册表的位置.但是,如果这是.NET应用程序,则应将连接字符串放在.config文件中.
You still do not understand what ODBC is about. ODBC is simply a type of interface for accessing a database. Each of these interfaces require specific connection string containing information regarding the user and the database location.
You can put several types of connection strings of different interface(ODBC, OLEDB, etc) on the system registry to be used.

As it is now year 2010 you should be using OLEDB instead, unless the database you are connecting to only supports ODBC.

You may require rights to read a registry depending on the registry location. However if this is a .NET application you should put your connection string in the .config file.


这篇关于通过ODBC连接使用注册表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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