MySQL Forums
Forum List  »  Newbie

VBScript and MySQL Problems with LOAD DATA INFILE
Posted by: James Rainaldi
Date: December 28, 2007 10:58AM

Hello MySQL community,

I have been having a hard time trying to figure out this problem. It might be a simple suggestion but I am new to scripting and MySQL and any help would be greatly appreciated.

Problem:
I am trying to run a vbscript that will truncate a table in my database and then load a csv file into the same database using Windows Scheduled Tasks. When I try to load the file using vbscript it errors out because of the carriage return character. If I go into the mysql client window and copy and paste the line (below) it works correctly but when executed through the vbscript it errors out. Are there any suggestions.

Line:
LOAD DATA INFILE '/Program Files/MySQL/MySQL Server 5.0/bin/csv/student.csv' replace INTO TABLE studentid FIELDS TERMINATED BY ',' LINES TERMINATED BY '%\n' (id, s_id, bday, lname, fname, mi);"

Options: ReplyQuote


Subject
Written By
Posted
VBScript and MySQL Problems with LOAD DATA INFILE
December 28, 2007 10:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.