lucausa75
29-11-2004, 14:04
Salve ragazzi,
vorrei effettuare una connessione ad un DataBase di Access protetto da password:"AAA";cosa debbo aggiungere?
Grazie 1000!
Sub Esegui_Connessione(DB As String, TB As String)
Set Cnn = New ADODB.Connection
Set Rst = New ADODB.Recordset
Tabella = TB
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\" & DB & ".mdb;" & "Mode=ReadWrite|Share Deny None;Persist Security Info=False"
Cnn.Open StrCnn
StrSql = "SELECT * From " & TB
Rst.CursorType = adOpenStatic
Rst.CursorLocation = adUseClient
Rst.Open StrSql, Cnn
Rst.Close
Cnn.Close
Set Rst = Nothing
Set Cnn = Nothing
End Sub
vorrei effettuare una connessione ad un DataBase di Access protetto da password:"AAA";cosa debbo aggiungere?
Grazie 1000!
Sub Esegui_Connessione(DB As String, TB As String)
Set Cnn = New ADODB.Connection
Set Rst = New ADODB.Recordset
Tabella = TB
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\" & DB & ".mdb;" & "Mode=ReadWrite|Share Deny None;Persist Security Info=False"
Cnn.Open StrCnn
StrSql = "SELECT * From " & TB
Rst.CursorType = adOpenStatic
Rst.CursorLocation = adUseClient
Rst.Open StrSql, Cnn
Rst.Close
Cnn.Close
Set Rst = Nothing
Set Cnn = Nothing
End Sub