Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2013, 13:58
fqjp fqjp is offline
Friend
 
Join Date: Apr 2011
Posts: 46
Rept. Given: 1
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 2
Thanks Rcvd at 38 Times in 20 Posts
fqjp Reputation: 2
The following codes using odbc��u can try it.

connect server
Public Function ConnectServer(ByVal ServerName As String, ByVal DBName As String, ByVal UserName As String, ByVal PWD As String) As Boolean

Dim ConnectString As String

On Error GoTo Error_ConnectServer

rdoEngine(0).CursorDriver = rdUseClientBatch
ConnectString = "Driver={Microsoft ODBC For Oracle};Server=" & DBName & "_" & ServerName & ";UID=" & UserName & ";PWD=" & PWD & ";"
Set grdoCN = rdoEngine(0).OpenConnection("", rdDriverNoPrompt, False, ConnectString) ', rdAsyncEnable)

ConnectServer = True
Exit Function

Error_ConnectServer:
ConnectServer = False
End Function

connect oracleserver
Public Function ConnectOracleServer(ByVal ServerName As String, ByVal DBName As String, ByVal UserName As String, ByVal PWD As String) As Boolean
Dim strConnect As String

On Error GoTo Error_ConnectOracleServer

strConnect = "Driver={Microsoft ODBC For Oracle};Server=" & DBName & "_" & ServerName & ";UID=" & UserName & ";PWD=" & PWD & ";"
adoORACLEConnect.Open strConnect

ConnectOracleServer = True
Exit Function

Error_ConnectOracleServer:
ConnectOracleServer = False
End Function
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 10:51.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )