Salve,
ho compilato un servizio windows accede ad un file .dbf usando connessione odbc.
Mi restituisce l'errore :
Il codice è:ERROR [42S02] [Microsoft][Driver ODBC dBase] Il modulo di gestione di database Microsoft Jet non è riuscito a trovare l'oggetto CARPANold.dbf'. Assicurarsi che l'oggetto esista e che il nome e il percorso siano digitati correttamente.
Potete aiutarmi ?codice:Dim Connection As Odbc.OdbcConnection Dim CARPANcommand As Odbc.OdbcCommand Dim CARPANreader As Odbc.OdbcDataReader Try Connection = New Odbc.OdbcConnection("Driver={Microsoft dBASE Driver (*.dbf)};Driverid=277;Dbq=C:\") Connection.Open() CARPANcommand = New Odbc.OdbcCommand("SELECT * FROM [CARPANold.dbf]", Connection) CARPANreader = CARPANcommand.ExecuteReader While CARPANreader.Read Try File.AppendAllText(LogPath, CARPANreader.Item("PARTITA").ToString) Message = CARPANreader.Item("PARTITA").ToString EventLog.WriteEntry("TEST", Message, EventLogEntryType.Error) Catch ex As Exception Message = "Errore creazione file (File.AppendAllText)" & vbCrLf & ex.Message EventLog.WriteEntry("TEST", Message, EventLogEntryType.Error) End Try End While Catch ex As Exception Message = "Errore di connessione" & vbCrLf & ex.Message EventLog.WriteEntry("TEST", Message, EventLogEntryType.Error) End Try
Grazie

Rispondi quotando


