Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
External table is not in the expected format.
Message
 
 
To
23/04/2004 22:13:29
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00897846
Message ID:
00897851
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
Lee,

Why don't you use VFP OLE DB provider? You can download it from http://www.microsoft.com/downloads/details.aspx?familyid=0f43eb58-7a94-4ae1-a59e-965869cb3bc9&displaylang=en.

>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform