Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked table to Normal Table

Status
Not open for further replies.

gizmo1973

MIS
Aug 4, 2004
2,828
GB
Access 2000.
I have a lnked table to a .DBF.
I need this to be a normal table so I can set regeistered numbers etc on it.
I have tried Make Table Query, A full query imported as a table, Get Info and all I get is an error statement saying "Invalid Argument" nothing else no explanation or help.
The table is 1745562 rows by 35 columns so I wouldn't have thought I was out of space and the menory on the machine is fine.
Any ideas or

Why?
or
How to create a table usnig a way I haven't yet?

Regards, Phil.

Full Member of Shareholders United.
Show your true support here:
"M.U.F.C. Not for sale to Glazer"
 
Have you tried to import the table instead to link it ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
No memo field in the DBF ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Well, the HARD way (which I have to do sometimes) is open the .dbf as a recordset, loop through it record by record and copy the fields into the table, which wouldbe a second recordset).

This is how I do it with FoxPro

On Error Resume Next
Dim strSQLFox As String
Dim rstFox As New ADODB.Recordset
Dim rstLocal As New ADODB.Recordset
Dim connFoxPro As String
Dim i As Integer
connFoxPro = "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=\\asnplus\c\asnplus\dbfs\;" & _
"Exclusive=No"
strSQLFox = "SELECT * from SomeTable"
rstFox.Open strSQLFox, connFoxPro, adOpenDynamic, adLockOptimistic
If rstFox.BOF = True And rstFox.EOF = True Then
Exit Sub
End If
rstLocal.Open strTbl, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
rstFox.MoveLast
rstFox.MoveFirst
Do Until rstFox.EOF
With rstLocal
.AddNew
For i = 0 To rstFox.Fields.Count - 1
If rstFox.Fields(i).Type <> "201" Then
.Fields(i) = rstFox.Fields(i)
End If
Next i
.Update
End With
rstFox.MoveNext
Loop
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top