Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor adapter with flat text file
Message
De
10/04/2015 11:43:42
 
 
À
10/04/2015 08:20:37
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618008
Message ID:
01618171
Vues:
30
>>>>What are you trying to do? Cursor adapter should be able to work with anything that has ODBC driver or OLE DB provider.
>>>>
>>>>>
>>>>>Is there any sample code for use cursor adapter with flat text file?
>>>
>>>I just want to insert-update-delete from a SDF type text file. I found connection strings from Google but couldn't understand the correct typing. says path and extension. When I try to select with a cursor name will it search a text file from that folder with that extension?
>>
>>Metin,
>>
>>I often have to work with other peoples data. Most of the cases I found it best to create a vfp cursor or table from the data given, check if some clean up processing needs to be done and then move that data into the intended target tables via SQL. The vfp import wizard sometimes is helpful, other times I just create a cursor definition in the command window.
>>
>>Having discrete stages is helpful the first time you find something weird which needs to be corrected ;-))
>>
>>my 0.02€
>>
>>thomas
>
>Thank you Thomas, but it's not an SQL case. I should update a text file. Currently I do this with fopen fwrite fclose. But sometimes ocrur some overflows, I know there is a bug buth may be change with a cursor adapter more easy way...

Even then you read in the file into a cursor, manipulate it there and send out the changes.
Not much different from reading in the whole file into a table, doing the needed changes and copy the whole file out again.
As max file is 2GB, not that much time even in worst case ;-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform