问题描述
Windows Vista
Visual Studio 2008 Team Suite
Microsoft Access 2007
错误:初始化字符串的格式不符合从索引0开始的规范
Windows Vista
Visual Studio 2008 Team Suite
Microsoft Access 2007
Error: Format of the initialization string does not conform to specification starting at index 0
我见过讨论
http://social.msdn.microsoft.com/Forums/en-CA/adodotnetdataproviders/thread/9f191038-dbf6-4306-8f66-ec211a1e933a 并且没有任何建议有帮助。
I've seen the discussion http://social.msdn.microsoft.com/Forums/en-CA/adodotnetdataproviders/thread/9f191038-dbf6-4306-8f66-ec211a1e933a and none of the suggestions help.
当我用
时1.点击"添加新数据源" "数据源配置向导"出现。
When I
1. Click "Add New Data Source" the "Data Source Configuration Wizard" appears.
2。我选择"数据库",然后点击"下一步"。成功的数据连接可从以下屏幕的下拉列表中获得,但它们都不是我想要的。我点击"新建连接" "添加连接"出现对话框。
2. I choose "Database", then click "Next". Successful data connections are available from the dropdown in the following screen, but none of them are what I want. I click "New Connection" The "Add Connection" dialog box appears.
3. 我点击"更改"并选择条目"Microsoft Access数据库文件"。 我点击"确定"。
3. I click "Change" and select the entry "Microsoft Access Database file". I click "OK".
4。 "添加连接"对话框在顶部显示适当的选项,但下面的列表仅包含"Misc"类别。使用条目连接字符串。当我在旁边的框中键入连接字符串时,我可以单击"测试连接"。
并报告成功。但是,如果我单击OK,我会收到上面引用的错误消息。
4. The "Add Connection" dialog box displays the appropriate choice at the top, but the list below contains only the category "Misc" with an entry Connection String. When I type the connection string into the box next to that I can click on "Test Connection" and that reports success. But if I click on OK I get the error message quoted above.
我已尝试使用JET和ACE连接字符串(使用* .mdb resp。* .accdb文件),出现相同的错误消息。我已经检查并仔细检查了拼写,流浪角等等,并且没有发现任何错误。示例:
I've tried both with JET and ACE connection strings (with *.mdb resp. *.accdb files), the same error message appears. I've checked and double-checked spelling, stray characters, etc. and don't find any errors. Sample:
Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" D:\ Books\WordDev3Final\CD-ROM \Datenbank \ Nordwind.mdb" ;
Provider=Microsoft.Jet.OLEDB.4.0;Data Source="D:\Books\WordDev3Final\CD-ROM\Datenbank\Nordwind.mdb";
当我在VBA过程中使用它通过ADO链接时,连接字符串可以工作。
The connection string DOES work when I use it in a VBA procedure to link via ADO.
我尝试修复Visual Studio安装没有快乐。
I tried a repair of the Visual Studio installation, no joy.
我还能尝试什么?
编辑:我在另一个安装上尝试了相同的操作,并在步骤中获得了完全不同的对话框4.上面。该机器上的连接没有问题。但我需要在我的主要开发机器上,而不是别人的。
I tried the same on another installation and got a completely different dialog box in Step 4. above. There was no problem with the connection on that machine. But I need this on my main development machine, not someone else's.
推荐答案
感谢您的帖子。
在您的第4步中,"添加连接"对话框应该这样:
In your step4 the "Add Connection" dialog box should like in this way:
你可以"浏览"您的.accdb文件,然后是"测试连接"----->成功
you can "Browse" your .accdb file, then "Test Connection"-----> success
>>>>>""添加连接"对话框在顶部显示相应的选项,
但下面的列表 仅包含 类别"其他"使用条目连接字符串。当我在旁边的框中键入连接字符串时,我可以单击"测试连接"。并报告成功。但是,如果我点击确定,我会收到
我收到上面引用的错误消息。
>>>>>The "Add Connection" dialog box displays the appropriate choice at the top,but the list below contains only thecategory "Misc" with an entry Connection String. When I type the connection string into the box next to that I can click on "Test Connection" and that reports success. But if I click on OK I get the error message quoted above.
连接字符串可能是这样的: ( " Provider = Microsoft.ACE.OLEDB .12.0 ;数据 Source = | DataDirectory | \users.accdb" )
Connection string may like this way:("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\users.accdb")
有美好的一天。
这篇关于连接到Access数据库的问题:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!