在我的数据库中找到DSN? [英] Finding The DSN To My Database?

查看:96
本文介绍了在我的数据库中找到DSN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SQL数据库,并想使用VBA连接到它,以便支持某些旧功能。我正在使用ADODB连接,需要知道我的数据库DSN是什么。我怎么找到这个?

I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I'm using an ADODB connection and need to know what my database DSN is. How can I find this?

我正在使用SQL Server 2008,谢谢! :D

I'm using SQL Server 2008, thanks! :D

推荐答案

DSN(数据源名称)是引用数据库的间接方式。您必须手动创建它们(或使用某种向导半自动创建)。转到 ControlPanel-> AdministrativeTools->数据源(ODBC),查看是否已经为要连接的数据库定义了一个。

A DSN (data source name) is an indirect way of referring to the database. You have to create them manually (or semi-automatically using a wizard of some kind). Go to ControlPanel->AdministrativeTools->DataSources (ODBC) to see if one has already been defined for the database to which you want to connect.

但是我认为您可能是指连接字符串,而不是 DSN。有很多方法可以告诉ADODB如何查找并连接到数据库( DSNs 只是其中一种),但是您总是一个连接字符串。

But I think you might mean "connection string", not "DSN". There are many, many ways to tell ADODB how to find and connect to your database (DSNs are just one of those), but you always need a connection string.

我经常转向 ConnectionStrings.com 帮助我度过类似但不相同的迷宫。

I have often turned to ConnectionStrings.com to help me through the maze of similar-but-not-identical options.

这篇关于在我的数据库中找到DSN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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