Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to insert data in remote Foxpro table
Message
From
16/12/2003 12:17:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How to insert data in remote Foxpro table
Miscellaneous
Thread ID:
00859551
Message ID:
00859551
Views:
63
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
Next
Reply
Map
View

Click here to load this message in the networking platform