Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: perl DBI LOAD DATA INFILE

by nickd (Novice)
on Oct 14, 2013 at 09:42 UTC ( [id://1058162]=note: print w/replies, xml ) Need Help??


in reply to Re: perl DBI LOAD DATA INFILE
in thread perl DBI LOAD DATA INFILE

I do not get any error value. It says undef. I have posted the trace output below
!! warn: 0 CLEARED by call to connect method <- connect('TestMMDB:localhost', 'user', ...)= ( DBI::db=HASH(0x18 +88a5c) ) [1 items] at DBI.pm line 658 <- STORE('PrintError', 1)= ( 1 ) [1 items] at DBI.pm line 710 <- STORE('AutoCommit', 1)= ( 1 ) [1 items] at DBI.pm line 710 <- STORE('Username', 'user')= ( 1 ) [1 items] at DBI.pm line 713 <- connected('dbi:mysql:TestMMDB:localhost', 'user', ...)= ( undef + ) [1 items] at DBI.pm line 720 <- connect= DBI::db=HASH(0x1888a5c) <- STORE('dbi_connect_closure', CODE(0x1896404))= ( 1 ) [1 items] +at DBI.pm line 729 <- prepare('LOAD DATA INFILE ? INTO TABLE ? FIELDS TERMINATED BY ' +,' (Date,Symbol,Open,High,Low,Close,Volume)')= ( DBI::st=HASH(0x1889b +b4) ) [1 items] at te st.pl line 33 <- execute('D:\NickD\Project\StockData\PriceAMS_2013-10-13.csv', ' +TestMMDB.PriceAMS')= ( undef ) [1 items] at test.pl line 34 <- errstr= ( undef ) [1 items] at test.pl line 34 Use of uninitialized value in concatenation (.) or string at test.pl l +ine 34. Oops!: Can't execute the query : at test.pl line 34. <- DESTROY(DBI::st=HASH(0x1889df4))= ( undef ) [1 items] at test.p +l line 34 <- DESTROY(DBI::db=HASH(0x1888c0c))= ( undef ) [1 items] at test.p +l line 34 <- disconnect_all= ( ) [0 items] (not implemented) at DBI.pm line +737 ! <- DESTROY(DBI::dr=HASH(0x18964b4))= ( undef ) [1 items] during gl +obal destruction

Replies are listed 'Best First'.
Re^3: perl DBI LOAD DATA INFILE
by Anonymous Monk on Nov 23, 2015 at 19:24 UTC
    You can't use prepared statements for load infile, you need to do a direct do() call.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1058162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found