Visual Studio 2005和Access数据库之谜 [英] Visual Studio 2005 and Access database mystery

查看:65
本文介绍了Visual Studio 2005和Access数据库之谜的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在获取Microsoft Visual Studio时遇到以下问题

2005 Professional链接到Access .mdb


数据库。请帮我解决这个问题。


问题1:

Microsoft页面如何:连接到Access数据库中的数据 ;

http:// msdn2 .microsoft.com / zh-cn / library / cf131f6b.aspx 说明如何连接到Access数据库的




1.在数据菜单上,单击添加新数据源。


2.在选择数据源类型页面上选择数据库。


3.选择New Connection以创建新的数据连接。


注意

如果数据源不是Microsoft Access数据库文件,则选择

更改以打开选择/更改数据源


对话框,选择Microsoft Access数据库文件,然后单击

继续。

4.默认提供程序是OLE DB的.NET Framework Provider。有关更多

的信息,请参阅选择/更改数据源


对话框。


5.在数据库中文件名框,输入.mdb文件的路径,或者

点击浏览按钮找到数据库


文件。


6.如果数据库需要,请输入登录信息。有关更多

的信息,请参阅添加/修改连接(Microsoft


访问权限)。


7.单击确定,然后单击下一步。


在上面的步骤5中,它讨论了一个浏览按钮。我没有得到那个但是

而是给了一个标题为Add Connection


的对话框,唯一的选择就是ConnectionString。我已经为连接字符串尝试了各种各样的

选项,但总是得到


错误消息初始化字符串的格式不符合

规范从索引0开始>

问题2:

Hi,

I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb

database. Please help me to sort this out.

Problem 1:

The Microsoft page "How to: Connect to Data in an Access Database"

http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:

1. On the Data menu, click Add New Data Source.

2. Select Database on the Choose a Data Source Type page.

3. Select New Connection to create a new data connection.

Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source

dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source

Dialog Box.

5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database

file.

6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft

Access).

7. Click OK, and then click Next.

In step 5 above it talks of a browse button. I dont''t get that but
rather am given a dialog box titled Add Connection

and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the

error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:


>从同一页面说明:"将.mdf或.mdb文件从Windows
>From the same page it states: "Drag an .mdf or .mdb file from Windows



Explorer拖到解决方案资源管理器中,以便


自动配置连接并启动数据源

配置向导可供您选择要在您的应用程序中使用的
对象。


当我拖放一个Access数据库时,例如。 Northwind.mdb进入

解决方案资源管理器窗口我得到以下内容


错误:处理本地数据文件时发生错误:对象
引用未设置为对象的实例


问题:


1.在问题1中为什么不要''我得到了正确的对话框,浏览

功能?我有微软Visual Studio 2005


专业安装在我的笔记本电脑和我的主电脑上,他们都做了同样的事情。

。我已经安装了所有补丁和更新





2.如何解决问题2?我已经搜索了一个解决方案,并且

找不到。我卸载了.Net

框架2并重新安装它没有区别。我认为两个

的问题是相关的。


非常感谢你的帮助。


Surfrat。

Explorer into Solution Explorer to

automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the

objects to use in your application."

When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following

error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"

Questions:

1. In problem 1 why don''t I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005

Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates

installed.

2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net

Framework 2 and reinstalled it with no difference. I think the two
problems are related.

Thanks very much for your help.

Surfrat.

推荐答案




你真的在计算机上安装了Access吗? />
您是否可能没有必要的ODBC驱动程序(或其他)

来连接Access数据库?


干杯,


克里斯。


< su ****** @ hotmail.comwrote in message

news:11 ********************* @ i3g2000cwc.googlegrou ps.com ...
Hi,

Do you actually have Access installed on the computers?
Is it possible that you don''t have the necessary ODBC drivers (or whatever)
to connect to an Access database?

Cheers,

Chris.

<su******@hotmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...




我在获取Microsoft Visual Studio时遇到以下问题

2005 Professional链接到Access .mdb


数据库。请帮我解决这个问题。


问题1:

Microsoft页面如何:连接到Access数据库中的数据 ;

http:// msdn2 .microsoft.com / zh-cn / library / cf131f6b.aspx 说明如何连接到Access数据库的




1.在数据菜单上,单击添加新数据源。


2.在选择数据源类型页面上选择数据库。


3.选择New Connection以创建新的数据连接。


注意

如果数据源不是Microsoft Access数据库文件,则选择

更改以打开选择/更改数据源


对话框,选择Microsoft Access数据库文件,然后单击

继续。


4.默认提供程序是OLE DB的.NET Framework提供程序。有关更多

的信息,请参阅选择/更改数据源


对话框。


5.在数据库中文件名框,输入.mdb文件的路径,或者

点击浏览按钮找到数据库


文件。


6.如果数据库需要,请输入登录信息。有关更多

的信息,请参阅添加/修改连接(Microsoft


访问权限)。


7.单击确定,然后单击下一步。


在上面的步骤5中,它讨论了一个浏览按钮。我没有得到那个但是

而是给了一个标题为Add Connection


的对话框,唯一的选择就是ConnectionString。我已经为连接字符串尝试了各种各样的

选项,但总是得到


错误消息初始化字符串的格式不符合

规范从索引0开始>


问题2:
Hi,

I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb

database. Please help me to sort this out.

Problem 1:

The Microsoft page "How to: Connect to Data in an Access Database"

http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:

1. On the Data menu, click Add New Data Source.

2. Select Database on the Choose a Data Source Type page.

3. Select New Connection to create a new data connection.

Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source

dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source

Dialog Box.

5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database

file.

6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft

Access).

7. Click OK, and then click Next.

In step 5 above it talks of a browse button. I dont''t get that but
rather am given a dialog box titled Add Connection

and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the

error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:

>>来自同一页面说明:将.mdf或.mdb文件从Windows
>>From the same page it states: "Drag an .mdf or .mdb file from Windows



资源管理器拖到解决方案资源管理器中以自动
配置连接并启动数据源

配置向导已准备就绪,您可以选择要在应用程序中使用的
对象。


当我拖放一个Access数据库时,例如。 Northwind.mdb进入

解决方案资源管理器窗口我得到以下内容


错误:处理本地数据文件时发生错误:对象
引用未设置为对象的实例


问题:


1.在问题1中为什么不要''我得到了正确的对话框,浏览

功能?我有微软Visual Studio 2005


专业安装在我的笔记本电脑和我的主电脑上,他们都做了同样的事情。

。我已经安装了所有补丁和更新





2.如何解决问题2?我已经搜索了一个解决方案,并且

找不到。我卸载了.Net

框架2并重新安装它没有区别。我认为两个

的问题是相关的。


非常感谢你的帮助。


Surfrat。

Explorer into Solution Explorer to

automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the

objects to use in your application."

When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following

error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"

Questions:

1. In problem 1 why don''t I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005

Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates

installed.

2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net

Framework 2 and reinstalled it with no difference. I think the two
problems are related.

Thanks very much for your help.

Surfrat.



你好克里斯,


是的,我在两台机器上都有Access 2003 ...


我可以从Access访问数据库。


谢谢


SurfRat


ChrisM写道:
Hi chris,

Yes I have Access 2003 on both machines...

I can access the databases fine from Access.

Thanks

SurfRat

ChrisM wrote:




你真的在计算机上安装了Access吗?

您是否有可能没有必要的ODBC驱动程序(或其他)

连接到Access数据库?


干杯,


克里斯。


< su ****** @ hotmail.comwrote in message

news:11 ********************* @ i3g2000cwc.googlegrou ps.com ...
Hi,

Do you actually have Access installed on the computers?
Is it possible that you don''t have the necessary ODBC drivers (or whatever)
to connect to an Access database?

Cheers,

Chris.

<su******@hotmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...




我在获取Microsoft Visual Studio时遇到以下问题

2005专业链接到Access .mdb


数据库。请帮我解决这个问题。


问题1:

Microsoft页面如何:连接到Access数据库中的数据 ;

http:// msdn2 .microsoft.com / zh-cn / library / cf131f6b.aspx 说明如何连接到Access数据库的




1.在数据菜单上,单击添加新数据源。


2.在选择数据源类型页面上选择数据库。


3.选择New Connection以创建新的数据连接。


注意

如果数据源不是Microsoft Access数据库文件,则选择

更改以打开选择/更改数据源


对话框,选择Microsoft Access数据库文件,然后单击

继续。

4.默认提供程序是OLE DB的.NET Framework Provider。有关更多

的信息,请参阅选择/更改数据源


对话框。


5.在数据库中文件名框,输入.mdb文件的路径,或者

点击浏览按钮找到数据库


文件。


6.如果数据库需要,请输入登录信息。有关更多

的信息,请参阅添加/修改连接(Microsoft


访问权限)。


7.单击确定,然后单击下一步。


在上面的步骤5中,它讨论了一个浏览按钮。我没有得到那个但是

而是给了一个标题为Add Connection


的对话框,唯一的选择就是ConnectionString。我已经为连接字符串尝试了各种各样的

选项,但总是得到


错误消息初始化字符串的格式不符合

规范从索引0开始>

问题2:
Hi,

I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb

database. Please help me to sort this out.

Problem 1:

The Microsoft page "How to: Connect to Data in an Access Database"

http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:

1. On the Data menu, click Add New Data Source.

2. Select Database on the Choose a Data Source Type page.

3. Select New Connection to create a new data connection.

Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source

dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source

Dialog Box.

5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database

file.

6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft

Access).

7. Click OK, and then click Next.

In step 5 above it talks of a browse button. I dont''t get that but
rather am given a dialog box titled Add Connection

and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the

error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:

>从同一页面说明:"将.mdf或.mdb文件从Windows
>From the same page it states: "Drag an .mdf or .mdb file from Windows



Explorer拖到解决方案资源管理器中,以便


自动配置连接并启动数据源

配置向导可供您选择要在您的应用程序中使用的
对象。


当我拖放一个Access数据库时,例如。 Northwind.mdb进入

解决方案资源管理器窗口我得到以下内容


错误:处理本地数据文件时发生错误:对象
引用未设置为对象的实例


问题:


1.在问题1中为什么不要''我得到了正确的对话框,浏览

功能?我有微软Visual Studio 2005


专业安装在我的笔记本电脑和我的主电脑上,他们都做了同样的事情。

。我已经安装了所有补丁和更新





2.如何解决问题2?我已经搜索了一个解决方案,并且

找不到。我卸载了.Net

框架2并重新安装它没有区别。我认为两个

的问题是相关的。


非常感谢你的帮助。


Surfrat。

Explorer into Solution Explorer to

automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the

objects to use in your application."

When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following

error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"

Questions:

1. In problem 1 why don''t I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005

Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates

installed.

2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net

Framework 2 and reinstalled it with no difference. I think the two
problems are related.

Thanks very much for your help.

Surfrat.


嗯,你选择''Microsoft Jet ...''提供商不是吗?


很抱歉问这些愚蠢的问题,提供商doens''t
似乎知道你想要打开一个Access数据库并给你

正确对话框选择它...


干杯,


克里斯。


< su ****** @ hotmail.comwrote in message

news:11 ******************** **@h48g2000cwc.googlegr oups.com ...
Hmmm, you are selecting the ''Microsoft Jet...'' provider aren''t you?

Sorry to ask these dumb questions, it just strange the the provider doens''t
seem to know that you want to open an Access database, and giving you the
correct dialog to select it...

Cheers,

Chris.

<su******@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...

你好克里斯,


是的,我有两个Access 2003机器......


我可以从Access访问数据库。


谢谢


SurfRat


ChrisM写道:
Hi chris,

Yes I have Access 2003 on both machines...

I can access the databases fine from Access.

Thanks

SurfRat

ChrisM wrote:

>

你真的安装了Access吗?在电脑上?
你可能没有必要吗? ODBC驱动程序(或
无论如何)
连接到Access数据库?

干杯,

Chris。

< ; su ****** @ hotmail.com写信息
新闻:11 ********************* @ i3g2000cwc.googlegro ups.com。 ..
>Hi,

Do you actually have Access installed on the computers?
Is it possible that you don''t have the necessary ODBC drivers (or
whatever)
to connect to an Access database?

Cheers,

Chris.

<su******@hotmail.comwrote in message
news:11*********************@i3g2000cwc.googlegro ups.com...




我在获取Microsoft Visual Studio时遇到以下问题

2005 Professional链接到Access .mdb


数据库。请帮我解决这个问题。


问题1:

Microsoft页面如何:连接到Access数据库中的数据 ;

http:// msdn2 .microsoft.com / zh-cn / library / cf131f6b.aspx 说明如何连接到Access数据库的




1.在数据菜单上,单击添加新数据源。


2.在选择数据源类型页面上选择数据库。


3.选择New Connection以创建新的数据连接。


注意

如果数据源不是Microsoft Access数据库文件,则选择

更改以打开选择/更改数据源


对话框,选择Microsoft Access数据库文件,然后单击

继续。


4.默认提供程序是OLE DB的.NET Framework提供程序。有关更多

的信息,请参阅选择/更改数据源


对话框。


5.在数据库中文件名框,输入.mdb文件的路径,或者

点击浏览按钮找到数据库


文件。


6.如果数据库需要,请输入登录信息。有关更多

的信息,请参阅添加/修改连接(Microsoft


访问权限)。


7.单击确定,然后单击下一步。


在上面的步骤5中,它讨论了一个浏览按钮。我没有得到那个但是

而是给了一个标题为Add Connection


的对话框,唯一的选择就是ConnectionString。我已经为连接字符串尝试了各种各样的

选项,但总是得到


错误消息初始化字符串的格式不符合

规范从索引0开始


问题2:

从同一页面上它指出:拖动.mdf或。 Windows中的mdb文件

资源管理器进入解决方案资源管理器


自动配置连接并启动数据源

配置向导准备好了您可以选择要在您的应用程序中使用的
对象。


当我拖放一个Access数据库时,例如。 Northwind.mdb进入

解决方案资源管理器窗口我得到以下内容


错误:处理本地数据文件时发生错误:对象
引用未设置为对象的实例


问题:


1.在问题1中为什么不要''我得到了正确的对话框,浏览

功能?我有微软Visual Studio 2005


专业安装在我的笔记本电脑和我的主电脑上,他们都做了同样的事情。

。我已经安装了所有补丁和更新





2.如何解决问题2?我已经搜索了一个解决方案,并且

找不到。我卸载了.Net

框架2并重新安装它没有区别。我认为两个

的问题是相关的。


非常感谢你的帮助。


Surfrat。
Hi,

I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb

database. Please help me to sort this out.

Problem 1:

The Microsoft page "How to: Connect to Data in an Access Database"

http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:

1. On the Data menu, click Add New Data Source.

2. Select Database on the Choose a Data Source Type page.

3. Select New Connection to create a new data connection.

Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source

dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source

Dialog Box.

5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database

file.

6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft

Access).

7. Click OK, and then click Next.

In step 5 above it talks of a browse button. I dont''t get that but
rather am given a dialog box titled Add Connection

and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the

error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:

From the same page it states: "Drag an .mdf or .mdb file from Windows
Explorer into Solution Explorer to

automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the

objects to use in your application."

When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following

error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"

Questions:

1. In problem 1 why don''t I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005

Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates

installed.

2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net

Framework 2 and reinstalled it with no difference. I think the two
problems are related.

Thanks very much for your help.

Surfrat.



这篇关于Visual Studio 2005和Access数据库之谜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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