Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Upsizing from Access
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00632778
Message ID:
00632829
Vues:
20
Daniel,
You are right and I forgot to tell I tried it before.
But some fields in access where type "decimal" and where not well trasformed.

Max

>Maximo,
>You could try to use SQL passthrough. It's probably going to be faster because you don't have to call RSToCursor():
>
>
>*-- build connection string
>lcConnectionStr = "DRIVER={Microsoft Access Driver (*.mdb)};" +;
>                  "Dbq=d:\max\conversions\cec\them\as3snapshot.mdb;" +;
>                  "Uid=Admin;" +;
>                  "Pwd=;"
>
>*-- connect to MS Access
>lnAccess = SQLSTRINGCONNECT(lcConnectionStr)
>
>*-- import Access table into an SPT cursor
>SQLEXEC(lnAccess, "SELECT * FROM AILSRAC1100'")
>BROWSE
>
>
>HTH
>>Hi all,
>>
>>I need to get some data from an Access database, I'm using this:
>>
>>
>>mdbfilename = "d:\max\conversions\cec\them\as3snapshot.mdb"
>>
>>oVFPCOM = CreateObject("vfpcom.comutil")
>>
>>oRecordSet = CreateObject('ADODB.RECORDSET')
>>oRecordSet.CursorType = 3 && adOpenStatic Also adOpenForwardOnly
>>oRecordSet.LockType = 1   && adLockReadOnly
>>
>>loConn = createobject('ADODB.Connection')
>>loConn.open("Provider = Microsoft.JET.OLEDB.4.0;" + ;
>>			"Data Source = " + mdbfilename)
>>oRecordSet.ActiveConnection = loConn
>>oRecordSet.Open('SELECT * FROM AILSRAC1100')
>>
>>nError = oVFPCOM.RSToCursor(oRecordSet, 'mycursor')
>>
>>BROWSE
>>
>>
>>...It works, but all fields in the cursor are type general and empty :(
>>I used MDB2VFP from John Kozoil but it's too slow for this 100000 plus recors per table database.
>>I'm using MDAC 2.7.
>>
>>Max

...Y soy feliz, bien feliz, asi lo grito;
Mira, que el mundo sepa, que se sepa:
Soy feliz....                       

...And I'm happy, quite happy, so do I yell it;
Look, so the world knows it, so be known:
I'm happy...
 

Ismael Rivera "Oye cosita linda"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform