Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append From
Message
From
22/04/2005 06:35:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006950
Message ID:
01007395
Views:
17
>>>>FWIW never append from a CSV as CSV.
>>>>Cetin
>>>
>>>Yeah? Why? I need to import census data, to populate part of my database, that's supplied in CSV for. Now you've got me worried :-(
>>>
>>>Terry
>>
>>Terry,
>>Here is a simple example:
>>
>>Text to m.lcSample noshow
>>Name,BirthDate
>>n1,10/10/69
>>n2,01/01/1981
>>EndText
>>lcFile = Sys(2015)+".csv"
>>StrToFile(m.lcSample,m.lcFile)
>>
>>create cursor test (name c(10),birthdate d)
>>append from (m.lcFile) type csv
>>Erase (m.lcFile)
>>browse
>>
>>Try also using delimited instead of csv. You'd see why.
>>Cetin
>
>Hi cetin
>
>Hmmm ... interesting. Is it only the dates that are dodgy or are there problems with other data types? Just realised that there must have been some problem with importing from CSV files, some time ago, when I wrote it, cos I've just remembered that I insisted on XLS for import file :-) However, my import data, although Census info, bore no dates. Maybe I wrote it back in VFP 5 days and there was a problem with that - I don't know.
>
>Terry

Terry,
I don't know. Seeing that with a datatype was sufficient for me not to test with all types and use delimited instead.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform