Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upsizing from Access
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00632778
Message ID:
00632844
Views:
13
Maximo,
Maybe you could transform these fields as part of your SELECT? I don't know about Access, but something similar to CAST() or CONVERT() in SQL Server.

>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
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform