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

fugabc304 2004-10-07 10:45:35
各位高手,请问如何用VB连接和操作sybase数据库,急用,谢谢!
...全文
174 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
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

1,217

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧