Private Sub APRI_CONN2()
On Error GoTo ExitHandler
Dim strProvider As String, strSource As String, strConnection As String
If CN1 Is Nothing Then
strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
strSource = "Data Source=\\rom\work1$\FS\DATABASE\PATE.mdb;"
strConnection = strProvider & strSource & "Persist Security Info=False"
Set CN1 = New ADODB.Connection
CN1.Open strConnection
'CN1.Properties("Jet OLEDB:Max Locks Per File") = 2500000
End If
Set RS1 = New ADODB.Recordset
RS1.CursorLocation = adUseServer
RS1.CursorType = adOpenStatic
RS1.LockType = adLockReadOnly
Exit Sub
ExitHandler:
MsgBox Err.Description, vbExclamation
End Sub
i use this code to retrive recordset from a Join of Access table and a linked table from Teradata.
The prob is, when during the debug mode (Pf8) when cursor go to:
RS1.Open "ESTRAI_DA_TERADATA", CN1
appear a windows for inpouting a pasword of Terdadata!!!!!
Is possible to integrate the Password string in code?
On Error GoTo ExitHandler
Dim strProvider As String, strSource As String, strConnection As String
If CN1 Is Nothing Then
strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
strSource = "Data Source=\\rom\work1$\FS\DATABASE\PATE.mdb;"
strConnection = strProvider & strSource & "Persist Security Info=False"
Set CN1 = New ADODB.Connection
CN1.Open strConnection
'CN1.Properties("Jet OLEDB:Max Locks Per File") = 2500000
End If
Set RS1 = New ADODB.Recordset
RS1.CursorLocation = adUseServer
RS1.CursorType = adOpenStatic
RS1.LockType = adLockReadOnly
Exit Sub
ExitHandler:
MsgBox Err.Description, vbExclamation
End Sub
i use this code to retrive recordset from a Join of Access table and a linked table from Teradata.
The prob is, when during the debug mode (Pf8) when cursor go to:
RS1.Open "ESTRAI_DA_TERADATA", CN1
appear a windows for inpouting a pasword of Terdadata!!!!!
Is possible to integrate the Password string in code?