Insert blob data using prepared statements
am 26.07.2010 08:30:22 von Manasi Save--=_6jgvu1hd0rcw
Content-Type: text/plain;
charset=UTF-8
Content-Description: Plaintext Version of Message
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
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 ','"',Inputdata,'"',',',InputID,';');
Prepare stmt1 From @stmt;
Execute stmt1;
Deallocate prepare stmt1;
The executing statement looks like this :-
Insert into `mydb`.MyTable(MyData, MyID)
Select ** STREAM DATA **, 1;
This gives me an error saying mysql syntax near ** STREAM DATA..................
Can anyone give me any example how to insert blob data in database with prepared statement.
Thanks in advance.
--
Regards,
Manasi Save
Artificial Machines Private Limited
manasi.save@artificialmachines.com
Ph:-9833537392
--=_6jgvu1hd0rcw
Content-Type: multipart/related;
boundary="=_73ucc32e7r7k";
start="73vfojrga3cw@mail.artificialmachines.com"
Content-Transfer-Encoding: 7bit
This message is in MIME format.
--=_73ucc32e7r7k
Content-Type: text/html;
charset=UTF-8
Content-Description: HTML Version of Message
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-ID: 73vfojrga3cw@mail.artificialmachines.com
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
','"',Inputdata,'"',',',InputID,';');
Prepare stmt1 From @stmt;
Execute stmt1;
Deallocate prepare stmt1;
The executing statement looks like this :-
Insert into `mydb`.MyTable(MyData, MyID)
Select ** STREAM DATA **, 1;
This gives me an error saying mysql syntax near ** STREAM
DATA..................
Can anyone give me any example how to insert blob data in database with prepared
statement.
Thanks in advance.
--
Regards,
Manasi Save
Artificial Machines Private
Limited
manasi.save@artificialmachines.com
Ph:-9833537392
--=_73ucc32e7r7k--
--=_6jgvu1hd0rcw--