Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to insert data in remote Foxpro table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00859551
Message ID:
00861373
Vues:
18
Hi Bharat,

Why do you try to make this using ADO?
You can crate ODBC connection to a folder containing free tables. Doesn't this work for you?

>I want to copy data from local Foxpro table to remote foxpro table.
>The remote table is free table means it is not connected to any database
>I tried by using ADO like
>#DEFINE adLockBatchOptimistic 4
>#DEFINE adCmdTable 2
>#DEFINE ADLOCKOPTIMISTIC 3
>#DEFINE adUseClient 3
>#DEFINE adOpenStatic 3
>#DEFINE ADOPENKEYSET 1
>#DEFINE ADLOCKPESSIMISTIC 2
>
>LOCAL loconn as adodb.connection
>Path_of_batch = "N:\Data1"
>
>loconn = CREATEOBJECT('adodb.connection')
>CREATE CONNECTION loconn CONNSTRING "Provider=MSDASQL.1;Driver={Microsoft Visual FoxPro Driver};SourceDB=" + Path_of_batch + ";SourceType=DBF "
>
> local lors As ADODB.Recordset
> lors = CREATEOBJECT('ADODB.REcordset')
> lors.ActiveConnection = loconn
> lors.CursorLocation = 3 && adUseClient
> lors.CursorType = 3 && adOpenStatic
> lors.LockType = 3 && adLockOptimistic
> lors.Open('select * from batch')
>
>I get an error in lors.Open() line. I think recordset works fine if connection is made to the database instead of individual table like in my case I am connecting to table N:\data1\batch.dbf. Is there any other way to update the remote table by writing the insert command?
>
>Thanks
>Bharat
Venelina Jordanova

Outsourcing IT Services Ltd.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform