04-26-2006 01:06 PM
I have written a VI to import a CSV file into a SQL data table but I
cannot get it to work when using a table with "datetime" data
format. It will import into a new table with undefined data
formats as "varchar" format but no luck when going into a table with the "datetime" data
format. I need the datetime format for date/time queries later. I have attached a zip file of my VI and the CSV file. Is there a problem with my CSV format or I am I doing something else wrong here? Please help. Thanks, Greg |
04-27-2006 06:39 PM
04-28-2006 02:34 AM
Hi Greg
I couldn't test your vi specifically as there vi's missing. We might have diffferent versions of the DBT. Anyway I replicated your VI in LV8.0 and DBT 1.0.1 and tested it on a MS Access database. It worked so maybe there is something else going wrong. I even changed the first field format in MS Access to be date/time format and that also worked.
There are few things that come to mind that would be worth checking
1. Is the database open successful?
2. I noticed that your array to cluster is set to 3 elements but your data is only 2 columns. This will only be a problem if you have created the table on you database with only two fields.
You mentioned varchar. Are you working with SQL Server or something else? When I get chance I will try your method on a MSDE Database. Its been a while but hopefully I will be able to try it and get back to you.
Trying to help
David
04-28-2006 05:15 AM - edited 04-28-2006 05:15 AM
Message Edited by David Crawford on 04-28-2006 11:17 AM
04-28-2006 01:02 PM