Sharepoint Designer 2007 ODBC 数据库无法连接到 MySQL?
我正在尝试在 SPD 2007 中创建到 ODBC 数据源的数据库连接,但完全没有运气。 不过,我使用 SqlDataSource 控件取得了一些成功。 我不知道SPD的数据库连接支持是坏了还是什么。 谷歌搜索发现其他人也有问题,但没有明确的答案。
所以,我的两个数据源是 MySQL 5.1 ODBC 和 ProvideX ODBC。 我在这两个方面都遇到了同样的问题,所以我只关注 MySQL。
我在运行 SPD 的计算机上有一个系统 DSN,该计算机已成功连接到 MySQL 数据库。 (如果此时很重要,则该 DSN 也存在于运行 Sharepoint 的服务器上)。
在 SPD 中,我进入数据源库,展开数据库连接,然后选择连接到数据库。 然后单击“配置数据库连接”。 由于此对话框中的两个提供程序都不合适,因此我选择“使用自定义连接字符串”。 然后,我将提供程序设置为“Microsoft .Net...ODBC”,此时我尝试了以下连接字符串。
首先 DSN 尝试:
Dsn=TheOneICreated (this one works from the SqlDataSource control)
和
Data Source=TheOneICreated
然后是更直接的方法:
Driver={MySQL ODBC 5.1 Driver};Server=myServerIP;Database=dbName;User=username;Password=password;Option=3
我得到的错误始终是相同的 -
“服务器错误:发生错误 从中检索数据库列表 :数据源的服务器 返回非特定错误时 尝试执行您的查询。 查看 您的查询的格式和内容 然后再试一次。 如果出现问题 仍然存在,请联系服务器 管理员。”
我在这里打的是一场失败的战斗吗?
I'm trying to create a Database Connection to ODBC data sources in SPD 2007 and am having absolutely no luck. I've had some success using an SqlDataSource control, however. I don't know if SPD's database connection support is just broken or what. Googling has turned up others having issues but no definitive answers.
So, my two data sources are MySQL 5.1 ODBC and ProvideX ODBC. I pretty much have the same trouble with either, so I'll just focus on MySQL.
I've got a system DSN on the machine running SPD that is successfully connecting to the MySQL database. (This DSN also exists on the server running Sharepoint, if that matters at this time).
In SPD, I go the Data Source Library, expand Database Connection, and choose Connect to a Database. I then click on Configure Database Connection. Since neither of the providers in this dialog are appropriate, I choose "Use a custom connection string". I then set the provider to "Microsoft .Net....ODBC" and at this point I've tried the following connection strings.
First the DSN attempts:
Dsn=TheOneICreated (this one works from the SqlDataSource control)
and
Data Source=TheOneICreated
Then the more direct approach:
Driver={MySQL ODBC 5.1 Driver};Server=myServerIP;Database=dbName;User=username;Password=password;Option=3
The error I get back is always the same -
"Server Error: An error occurred while
retrieving the list of Databases from
: The server for the data source
returned a non-specific error when
trying to execute your query. Check
the format and content of your query
and try again. If the problem
persists, contact the server
administrator."
Am I fighting a losing battle here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来 SD 可能正在枚举数据库和/或表,因此它有一个表和字段列表来“帮助”您......
只是一个或两个澄清问题......
这种情况会发生吗,因为 SD 正在期待一个枚举表的不同方式? (它实际上可以与 MySQL 或其他东西一起使用吗?)
您的 ODBC 跟踪是什么样的? (如果 #1 为真,您将能够看到它并可能创建支持视图...如果您确实需要它与这个特定的 dbms 一起工作...)
此连接是否从共享点服务器访问? 如果是这样,您是否需要定义您的 dsn 和 dsn? 那里有驱动程序?
It looks like SD could be enumerating databases and/or tables so it has a list of tables and fields to 'help' you along....
Just a clarifying question or two..
Could this happen because SD is expecting a different way of enumerating tables? (Does it actually work with MySQL or anything ?)
What does your ODBC trace look like? (If #1 is true, you'll be able to see it and possibly create supporting views...if you truly need it to work with this particular dbms...)
Is this connection accessed from the sharepoint server? If so, do you need to define your dsn & driver there?