其中使用OLEDB或ODBC为SYbase [英] which to use OLEDB or ODBC for SYbase

查看:151
本文介绍了其中使用OLEDB或ODBC为SYbase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚应该使用哪些驱动程序。即使我不知道我有什么。



当我试图通过.udl文件创建连接字符串时,它只显示SYbase ASE OleDB Provider



在安装文件夹中我可以看到在驱动程序列表Syabse Ase ODBC驱动程序,但在连接字符串它是无法拾取驱动程序,这里我使用Driver =(Sybase ASE ODBC驱动程序) / p>

我应该怎么办?



感谢

解决方案

使用udl,您只能生成使用oledb提供程序的连接字符串。 Sybase ODBC连接字符串类似于

 ODBC; Driver = {SYBASE ASE ODBC Driver}; Srvr = myServerName; = my_db; UID = myUsername; PWD = myPassword

另外,您可以创建odbc DSN ODBC数据源管理),然后使用连接字符串此

 ODBC; DSN = my_DSN; UID = myUsername; PWD = myPassword; 

如果通过.net连接,为什么不安装本地提供程序Sybase.Data .AseClient(Adaptive Server Enterprise托管提供程序)。在这种情况下,连接字符串将类似于以下

  Dim cn As New AseConnection(Data Source ='servername'; Port ='5000'; UID ='myUsername'; PWD ='myPassword'; Database ='my_db';)


I am not able to figure out which drivers should I use. Even I don't know what I have.

When I am trying to make the connection string through the .udl file it only shows SYbase ASE OleDB Provider

while in install folder I can see in driver list Syabse Ase ODBC driver but in connection string it is unable to pick up the driver, here I used Driver = (Sybase ASE ODBC Driver)

What should I go for?

Thanks

解决方案

Using udl you have only the possibility to generate a connection string that uses an oledb provider. A Sybase ODBC Connection String would look like this

"ODBC;Driver={SYBASE ASE ODBC Driver};Srvr=myServerName;Database=my_db;UID=myUsername;PWD=myPassword"

Alternativly, you could create an odbc DSN (using ODBC data source adminitration) and then use a connection string like this

"ODBC;DSN=my_DSN;UID=myUsername;PWD=myPassword;"

In case you are connecting through .net, why don't you install the native provider Sybase.Data.AseClient (Adaptive Server Enterprise Managed Provider). In that case the connection string would be like the following

Dim cn As New AseConnection("Data Source='servername';Port='5000';UID='myUsername';PWD='myPassword';Database='my_db';")

这篇关于其中使用OLEDB或ODBC为SYbase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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