'/ ¿À¶óŬ DB OPEN Public Sub svrOpenOraDBADO() Dim sConString As String Dim Cut As String Dim ArgUser$, ArgPassword$, ArgSource$ Screen.MousePointer = vbHourglass GnOpenDB = False Open App.path & "\svrMDCK_ORA.ini" For Input As #1 Line Input #1, Cut 'ID ArgUser = Replace(P(Cut, "=", 2), ";", "") Line Input #1, Cut 'PWD ArgPassword = Replace(P(Cut, "=", 2), ";", "") Line Input #1, Cut 'Date Source ArgSource = Replace(P(Cut, "=", 2), ";", "") Line Input #1, Cut 'Server Name svrGstrServerName = Replace(P(Cut, "=", 2), ";", "") Line Input #1, Cut GstrLocalCode = Replace(P(Cut, "=", 2), ";", "") Close #1 'sConString = "" 'sConString = sConString & "Provider=Microsoft OLE DB Provider for Oracle" & ";" 'sConString = sConString & "User ID=" & ArgUser & ";" 'sConString = sConString & "Data Source=" & ArgSource & ";" 'sConString = sConString & "Persist Security info=False" sConString = "" sConString = sConString & "Provider=Microsoft OLE DB Provider for Oracle;" sConString = sConString & "Data Source=" & ArgSource & ";" sConString = sConString & "Persist Security Info=False" On Error GoTo DBConnect_Error Set SvrloAdoCnn = New ADODB.Connection SvrloAdoCnn.CursorLocation = adUseClient SvrloAdoCnn.Open sConString, ArgUser, ArgPassword Screen.MousePointer = vbDefault GnOpenDB = True Exit Sub DBConnect_Error: MsgBox SvrloAdoCnn.Errors(0).number & vbCrLf & _ SvrloAdoCnn.Errors(0).Description & vbCrLf & vbCrLf & _ "ConnectString : " & sConString & vbCrLf & _ "Username : " & ArgUser & vbCrLf & _ "Password : " & ArgPassword End End Sub