insert record in foxpro table

D

dav

hi
I always use DAO e don't konw well other methods like ADO. This is the code
I wrote:

table 'tblFOXPRO' connect by odbc

Dim DS As DAO.Recordset
Set DS = CurrentDb.OpenRecordset("SELECT tblFOxPRO* FROM tblFOxPRO";")
With DS
.AddNew
!ID = 1
!CAMPO1 = A
!CAMPO2 = B
.Update
End With

This is the error I read:

ERRORE RUN-TIME 3146
ODBC: CHIAMATA NON RIUSCITA

when I do debug the yellow sign is on ".update" . Maybe I forgot any option
in openrecordset? thanks
 
O

OfficeDev18 via AccessMonster.com

In your ODBC connection, do you have any linked fields? If not, you cannot
add any records to the FoxPro table.

Hope this helps,

Sam
 
R

René François

When you pen the recordset, add the optional parameter DbOpenSeeChanges,
like this:
Set DS = CurrentDb.OpenRecordset("SELECT tblFOxPRO* FROM tblFOxPRO";",
DbOpenSeeChanges)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top