Re: Insert blob data using prepared statements

2010-08-07 Thread Shawn Green (MySQL)
On 7/26/2010 2:30 AM, Manasi Save wrote: Hi All, I need to insert Blob data in my table using prepared statements. But Whenever I try to insert it using prepared statement it is giving me mysql syntax error. Here's the prepared statement :- SET @stmt = Concat(Insert into ',mydb

Insert blob data using prepared statements

2010-07-25 Thread Manasi Save
Hi All,   I need to insert Blob data in my table using prepared statements. But Whenever I try to insert it using prepared statement it is giving me mysql syntax error.   Here's the prepared statement :-   SET @stmt = Concat(Insert into ',mydb,'.MyTable(MyData, MyID)      Select

Re: how to insert blob data remotely.. SOLVED :)

2004-07-01 Thread Héctor Maldonado
Hi Again.. Fortunately I found a way to do this using C++/Qt. Here's the code for who are interested in: QFile *myFile; QSqlQuery query; QString strQuery; QByteArray myByteArray; // open the image and fill the bytearray myFile = new QFile("/root/hm/variostepsa/fotos_marcopolo/paradi

RE: how to insert blob data remotely

2004-07-01 Thread Victor Pendleton
Is using a programming language such as Java, PHP or VB an option? -Original Message- From: HÃctor Maldonado To: [EMAIL PROTECTED]; Omar De la Cruz Sent: 7/1/04 10:06 AM Subject: how to insert blob data remotely Hi all!.. How can I insert blob data (specifically a jpg image) into a blob

Re: how to insert blob data remotely

2004-07-01 Thread Peter L. Berghold
On Thu, 2004-07-01 at 11:06, Héctor Maldonado wrote: > But LOAD_FILE only works if 'picture.jpg' is placed on the same machine > where the server is running. > That makes sense. You could of course NFS mount from the remote machine to the machine you are working from but that is much the same th

how to insert blob data remotely

2004-07-01 Thread Héctor Maldonado
Hi all!.. How can I insert blob data (specifically a jpg image) into a blob field remotely?.. I mean, the client has to choose a jpg image in his/her PC and upload it to the server. I found this piece of code: INSERT INTO car_models (Brand, Picture) VALUES ('Subaru Im

fail to insert BLOB data on multibyte charset MySQL server

2002-07-16 Thread xuefer tinys
failed to insert BLOB data on multibyte charset i'm using GBK charset. mysql 4.01 use PHP to insert, did addslashes before insert however, failed. i've read the mysql_escape_string() source code. noticed that, mb char is processed differently, but is it a must ? yes, php+libmysql is

Re: Fw: insert BLOB values

2002-06-24 Thread Victoria Reznichenko
Hytham, Saturday, June 22, 2002, 12:37:21 AM, you wrote: >> > i have a column of type blob, that i wish to store images in it, but >> how >> > can i right the sql statement to insert the image? >> > i mean : >> > insert into tblImages set imageField = ??? where id=999 It's not a correct stat

Fw: insert BLOB values

2002-06-22 Thread Hytham Shehab
- Original Message - From: "Hytham Shehab" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 22, 2002 12:15 AM Subject: Fw: insert BLOB values > > - Original Message - > From: "Hytham Shehab" <[EMAIL PROTECTED]> &g

RE: INSERT blob data in C

2002-02-28 Thread Kenneth Hylton
L PROTECTED]> -Original Message- From: paradoxix [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 3:04 PM To: Kenneth Hylton Cc: [EMAIL PROTECTED] Subject:Re: IN

Re: INSERT blob data in C

2002-02-28 Thread paradoxix
just some code I did some time ago: /* */ #include #include #include #include #include #include MYSQL dbcon; int main(int argc, char *argv[]) { int i; char *tmpQ=malloc(2*1024*1024); char *end; int file; int size; char *mem; char tmpstr[1024]; mysql_init(&dbcon); mys

INSERT blob data in C

2002-02-28 Thread Kenneth Hylton
Howdy - I looked in the doc @ mysql.com and the New Riders and O'Reilly MySQL books. Plus, I consulted the archives as best I could and did not see an answer for this: How do you insert binary data using the C API? I know you need to use mysql_real_query method and pass length, but how do you

RE: insert BLOB in perl

2001-10-29 Thread Dave Rolsky
On Mon, 29 Oct 2001, Jindo Soul wrote: > Why this error exists is beyond my knowledge though. > I am guessing that Perl DBI escapes ' \ in bind_param call. > And MySQL escapes the data again when using big5 charset, > which ultimate causes an error because of double escaping. Well, its not that

RE: insert BLOB in perl

2001-10-28 Thread Jindo Soul
values(?)")->execute($data)' Study the error message, you should get the idea as to why you have problems inserting binary data into MySQL when it's running using big5 as charset. Regards, Jindo > -Original Message- > From: Vincent Chen [mailto:[EMAIL PROTECTED

Re: insert BLOB in perl

2001-10-28 Thread Vincent Chen
Hi, Jeremy Thanks for your response. I got the following message while running perl script. -- output -- processing DCP_0260.JPG size=148135 DBD::mysql::st execute failed: You have an error in your SQL syntax near '9ÿ\0 ¨Ý¦»;ßÈïÓõ,EÂ~9íÒ¬(9àJS~PÃve ‹Ï®G`Z¾NÒXã;ã\0çúÓºwéÓQtWîCÏ' at line 1 at .

Re: insert BLOB in perl

2001-10-27 Thread Jeremy Zawodny
On Sat, Oct 27, 2001 at 09:08:40PM -0700, Vincent Chen wrote: > > Dear all, > > It might be a FAQ, but bothered me several days. I tried to insert > a BLOB,acturally a picture, into a table. but always got SQL error. But you haven't told us the error message you're getting! Have you double-ch

insert BLOB in perl

2001-10-27 Thread Vincent Chen
Dear all, It might be a FAQ, but bothered me several days. I tried to insert a BLOB,acturally a picture, into a table. but always got SQL error. this is what I do. $sth=$dbh->prepare("insert into photo values (?,?)"); $sth->bind_param(1,'2001-10-27'); $sth->bind_param(2,$image,SQL_BINARY); $s

could not insert BLOB data types in table

2001-08-18 Thread my-sql
Hi all, I could not insert BLOB data types in a table. I want that the INSERT statement should insert a picture in a field of a table. Like, INSERT INTO testtable (id, picture) values (1,picref) Here I want to know what should be the picref I know picref is a variable in a programming

Re: could not insert BLOB data type in a table

2001-07-25 Thread Ilya Martynov
>> Only use placeholders. $dbh->quote() is unreliable (and this fact is >> documented in DBI documentation). PD> Please show me the part of the documentation that you're referring to, PD> and please supply a counter-example. quote() is extremely useful for PD> producing SQL statements that will

Re: could not insert BLOB data type in a table

2001-07-25 Thread Paul DuBois
At 5:23 PM +0400 7/25/01, Ilya Martynov wrote: >PD> At 10:43 AM +0530 7/25/01, [EMAIL PROTECTED] wrote: >>> Hi, >>> >>> I just want to know how to insert a BLOB data type in a field of a >>> table. I want to put the binary data stream not the file link in the >>> filed. The language i m using

Re: could not insert BLOB data type in a table

2001-07-25 Thread Ilya Martynov
PD> At 10:43 AM +0530 7/25/01, [EMAIL PROTECTED] wrote: >> Hi, >> >> I just want to know how to insert a BLOB data type in a field of a >> table. I want to put the binary data stream not the file link in the >> filed. The language i m using is PERL5. PD> Use $dbh->quote() or placeholders to ins

Re: could not insert BLOB data type in a table

2001-07-24 Thread Paul DuBois
At 10:43 AM +0530 7/25/01, [EMAIL PROTECTED] wrote: >Hi, > >I just want to know how to insert a BLOB data type in a field of a >table. I want to put the binary data stream not the file link in the >filed. The language i m using is PERL5. Use $dbh->quote() or placeholders to insert the BLOB value

could not insert BLOB data type in a table

2001-07-24 Thread mysql
Hi, I just want to know how to insert a BLOB data type in a field of a table. I want to put the binary data stream not the file link in the filed. The language i m using is PERL5. Thanks in advance. Regards, Thakur Gyawali Nepal --

Insert BLOB

2001-02-12 Thread Eric Raymond G. Patdu
Hello there, I'm currently developing an app in VB with MySQL as the database and I'm having a hard time inserting a BLOB into MySQL. Can somebody share with me a code snippet on how to do this? Thanks, Eric