Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access to Paradox tables
Message
From
23/11/2004 18:41:06
 
 
To
23/11/2004 17:50:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
00964075
Message ID:
00964083
Views:
10
>
>I'm facing a problem with migrating data from Paradox to VFP tables. I need to seek your advice on how to access Paradox data from VFP.
>
Hi Tek

Through ODBC try something as:
lcstringconnect = 'CollatingSequence=ASCII;DBQ=C:\myfolder;';
                + 'DefaultDir=C:\myfolder ;Driver={Microsoft Paradox Driver ';
                + '*.db )};DriverId=538;FIL=Paradox5.X;MaxBufferSize=2048;';
                + 'MaxScanRows=8;PageTimeout;ReadOnly=False;pwd=mypassword' 

STORE SQLSTRINGCONNECT(lcstringconnect) TO gnconnhandle 

next_code       = '12345' 
IF  gnconnhandle <= 0 
    = MESSAGEBOX('No conecction', 16, 'Error on ODBC conection')
    return
Endif
instr1          = 'UPDATE mytable SET pedido= ?next_code' 
SET tablevalidate TO 4 
aa              = sqlexec(gnconnhandle, instr1) 
=AERROR(aerrorarray)                && Most recent error
CLEAR 
? DATETIME() 
? 'Taking a look at aerrorarray'
FOR N = 1 TO 7                      && Show all items of aerrorarray 
    ? aerrorarray(N) 
ENDFOR 
instr2          = 'SELECT * from mytable'
ab = sqlexec(gnconnhandle, instr2,'MYCURSOR') 

SELECT mycursor 
BROW 

= sqldisconnect(gnconnhandle) 
HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform