nel programmino che sto facendo dovrei avere la possibilità di aggiungere/eliminare le tabelle nel DataBase.
Ma come si può fare questo?
ora utilizzo un DB Access e mi collego a questo tramite un Modulo con questo codice:
codice:
Public cnDB As New ADODB.Connection
Public rsDB As New ADODB.Recordset
------------------------------------------------------
Public Sub Connessione()
'Connessioni per le coperture in legno
Dim strConnect As String
Dim strProvider As String
Dim strDataSource As String
Dim strDataBaseName As String
strProvider = "Provider= Microsoft.Jet.OLEDB.4.0;"
strDataSource = App.Path
strDataBaseName = "\DB.mdb"
strDataSource = "Data Source=" & strDataSource & strDataBaseName
strConnect = strProvider & strDataSource
cnDB.CursorLocation = adUseClient
cnDB.Open strConnect
'Generale
rsDB.CursorType = adOpenStatic
rsDB.CursorLocation = adUseClient
rsDB.LockType = adLockPessimistic
End Sub
---------------------------------------------------------
Public Sub ChiudiConnessione()
If cnDB.State = 1 Then
cnDB.Close
Set cnDB = Nothing
End If
End Sub
qualcuno di voi conosce il codice per aggiungere/eliminare una determinata tabella? (e volendo anche rimoninare)...