excel vba 怎样连接oracle数据库连接
1个回答
2017-05-11 · 知道合伙人软件行家
关注
展开全部
Sub connect_数据库()
Dim strconnt As String
Set connt = New ADODB.Connection
Dim rs As Object
Set rs = New ADODB.Recordset
Dim sevip, Db, user, pwd As String
'设服务器地址、所连数据,及登录用户密码
sevip = "****"
Db = "****"
user = "****"
pwd = "****"
strconnt = "DRIVER={Microsoft ODBC for Oracle};Password=apps;User ID=apps;Data Source=demo" '
connt.ConnectionString = strconnt
connt.Open
End Sub
Dim strconnt As String
Set connt = New ADODB.Connection
Dim rs As Object
Set rs = New ADODB.Recordset
Dim sevip, Db, user, pwd As String
'设服务器地址、所连数据,及登录用户密码
sevip = "****"
Db = "****"
user = "****"
pwd = "****"
strconnt = "DRIVER={Microsoft ODBC for Oracle};Password=apps;User ID=apps;Data Source=demo" '
connt.ConnectionString = strconnt
connt.Open
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询