高分提问:如何用VB连接和操作sybase数据库?

fugabc304 2004-10-07 10:45:35
各位高手,请问如何用VB连接和操作sybase数据库,急用,谢谢!
...全文
145 点赞 收藏 8
写回复
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
axer 2004-10-08
手动建一个odbc就可以了,用ado连
回复
cqm2099 2004-10-08
up
回复
tztz520 2004-10-07
MyConn.Open"driver={SybaseSystem11};uid=sa;pwd=1395765592;
srvr=hp;db=rsgl",
或参考:
http://www.china-askpro.com/msg47/qa92.shtml

http://www.51group.net/forum/showarticle.asp?boardid=5&articleid=1728

http://www.connectionstrings.com
回复
bluesky23 2004-10-07
用ODBC接口试试.
回复
haohaohappy 2004-10-07
OLE DB Provider for Sybase Adaptive Server Anywhere (ASA) :
oConn.Open "Provider=ASAProv;" & _
"Data source=myASA"

OLE DB Provider for Sybase Adaptive Server Enterprise (ASE)
oConn.Open "Provider=Sybase ASE OLE DB Provider;" & _
"Data source=myASEServer"
回复
haohaohappy 2004-10-07
ODBC Driver for Sybase :
注意:If using the Sybase System 12 (or 12.5) Enterprise Open Client ODBC Driver

oConn.Open "Driver={SYBASE ASE ODBC Driver};" & _
"Srvr=myServerName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"

ODBC Driver for Sybase SQL Anywhere:
oConn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
"DefaultDir=c:\dbpath\;" & _
"Dbf=c:\sqlany50\mydb.db;" & _
"Uid=myUsername;" & _
"Pwd=myPassword;" & _
"Dsn="""""
回复
daisy8675 2004-10-07
Standard Sybase System 12 (or 12.5) Enterprise Open Client:

"Driver={SYBASE ASE ODBC Driver};Srvr=Aron1;Uid=username;Pwd=password"



Standard Sybase System 11:

"Driver={SYBASE SYSTEM 11};Srvr=Aron1;Uid=username;Pwd=password;"
Do you know a userguide for Sybase System 11, 12, 12.5? E-mail the URL to connectionstrings.com now!! >>
Intersolv 3.10:

"Driver={INTERSOLV 3.10 32-BIT Sybase};Srvr=Aron1;Uid=username;Pwd=password;"



Sybase SQL Anywhere (former Watcom SQL ODBC driver):

"ODBC; Driver=Sybase SQL Anywhere 5.0; DefaultDir=c:\dbfolder\;Dbf=c:\mydatabase.db;Uid=username;Pwd=password;Dsn="""""
Note! The two double quota following the DSN parameter at the end are escaped quotas (VB syntax), you may have to change this to your language specific escape syntax. The empty DSN parameter is indeed critical as not including it will result in error 7778.


Read more in the Sybase SQL Anywhere User Guide >>
OLE DB


Adaptive Server Anywhere (ASA):

"Provider=ASAProv;Data source=myASA"
Read more in the ASA User Guide >>
Adaptive Server Enterprise (ASE) with Data Source .IDS file:

"Provider=Sybase ASE OLE DB Provider; Data source=myASE"
Note that you must create a Data Source .IDS file using the Sybase Data Administrator. These .IDS files resemble ODBC DSNs.
Adaptive Server Enterprise (ASE):

"Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDBname;User Id=username;Password=password"
- some reports on problem using the above one, try the following as an alternative -

"Provider=Sybase.ASEOLEDBProvider;Server Name=myASEserver,5000;Initial Catalog=myDBname;User Id=username;Password=password"
This one works only from Open Client 12.5 where the server port number feature works,燼llowing fully qualified connection strings to be used without defining燼ny .IDS Data Source files.
回复
ryuginka 2004-10-07
up
回复
发动态
发帖子

1180

社区成员

VB 数据库(包含打印,安装,报表)
申请成为版主
社区公告
暂无公告