Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
External table is not in the expected format.
Message
De
23/04/2004 22:13:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
External table is not in the expected format.
Divers
Thread ID:
00897846
Message ID:
00897846
Vues:
77
I'm getting this message trying to do a simple SELECT from a .DBF. I've come to the conclusion it's because of memo fields. Does Jet not support memo fields? If not, how can I pull data from a DBF?

Here's my test code that hits the error. It hits an execption with "External table is not in the expected format." on the da.Fill(dt) line. If I remove the memo fields from the DBF it runs fine.

Imports System.Data
Imports System.Data.OleDb

Module Module1
Public Sub Main()
Dim ConnectionString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\qn\data;" & _
"Extended Properties='dBASE IV';"
Dim sql As String = _
"select * from QN_DTL"

Dim cnn As New OleDbConnection(ConnectionString)
Dim da As New OleDbDataAdapter(sql, cnn)
Dim dt As New DataTable
Try
da.Fill(dt)
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
cnn.Close()
End Sub
End Module

-----
Lee Perkins
-----
Lee Perkins
TigerBase Technologies

"Lee is one that would plug his brain into the internet, if he could, and STILL scream for more" - Very good friend of Lee's
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform