Click here to Skip to main content
15,901,205 members
Home / Discussions / Database
   

Database

 
AnswerRe: BULK INSERT without using Files? Pin
Rafferty Uy2-Feb-05 12:08
Rafferty Uy2-Feb-05 12:08 
GeneralReplication: Applying initial snapshot is dropping existing tables in the database. Pin
RuchirD1-Feb-05 18:00
RuchirD1-Feb-05 18:00 
GeneralBest way to import MSDE data into Access Pin
elephantstar1-Feb-05 9:04
elephantstar1-Feb-05 9:04 
GeneralRe: Best way to import MSDE data into Access Pin
Anonymous1-Feb-05 19:47
Anonymous1-Feb-05 19:47 
GeneralRe: Best way to import MSDE data into Access Pin
Anonymous2-Feb-05 7:00
Anonymous2-Feb-05 7:00 
GeneralRe: Best way to import MSDE data into Access Pin
RoedRunner14-Feb-05 10:48
RoedRunner14-Feb-05 10:48 
GeneralSELECT INTO Pin
Orville1-Feb-05 8:17
Orville1-Feb-05 8:17 
Generalupdate image column in MySQL Pin
kd83411-Feb-05 4:55
kd83411-Feb-05 4:55 
I can update regular column with varchar/numeric type, but I when I try to update image data(longblob) in MySQL, but it doesn't work. Can anybody help me on how to do that?

Here is my code for this:

ProducerConn->Open();
ProducerSide->CommandText = "DROP TABLE IF EXISTS MyDB";
ProducerSide->ExecuteNonQuery();
ProducerSide->CommandText = "CREATE TABLE MyDB (ID timestamp(14), ext varchar(5), image longblob)";
ProducerSide->ExecuteNonQuery();

String * FILE = "image.jpg";
FileStream * tfs = new FileStream(FILE, FileMode::Open, FileAccess::Read);
Int16 len = (int)tfs->Length;
Byte buffer[] = new Byte[len];
tfs->Read(buffer, 0, buffer->Length);

// ProducerSide->CommandText = "update MyDB set image=buffer"; <---- line with problem
ProducerSide->CommandText = "UPDATE MyDB set ext='jpg'";
ProducerSide->ExecuteNonQuery();

Thanks!
GeneralRestore SQl DB On Machine Problem... Pin
1-Feb-05 3:51
suss1-Feb-05 3:51 
GeneralRe: Restore SQl DB On Machine Problem... Pin
Rob Graham1-Feb-05 5:48
Rob Graham1-Feb-05 5:48 
GeneralRe: Restore SQl DB On Machine Problem... Pin
Just Greeky Creek2-Feb-05 22:04
Just Greeky Creek2-Feb-05 22:04 
GeneralHangs when attempting to close the Recordset object Pin
CodingFrenzy1-Feb-05 3:06
CodingFrenzy1-Feb-05 3:06 
GeneralRe: Hangs when attempting to close the Recordset object Pin
Rob Graham1-Feb-05 5:56
Rob Graham1-Feb-05 5:56 
GeneralCalling functions in stored procedures Pin
Majid Shahabfar1-Feb-05 2:29
Majid Shahabfar1-Feb-05 2:29 
GeneralRe: Calling functions in stored procedures Pin
Colin Angus Mackay1-Feb-05 3:28
Colin Angus Mackay1-Feb-05 3:28 
GeneralRe: Calling functions in stored procedures Pin
Majid Shahabfar1-Feb-05 4:34
Majid Shahabfar1-Feb-05 4:34 
GeneralRe: Calling functions in stored procedures Pin
Colin Angus Mackay1-Feb-05 4:43
Colin Angus Mackay1-Feb-05 4:43 
GeneralDate stored as varchar required to be sorted Pin
xcavin31-Jan-05 19:49
xcavin31-Jan-05 19:49 
GeneralRe: Date stored as varchar required to be sorted Pin
Ritesh12341-Feb-05 2:04
Ritesh12341-Feb-05 2:04 
GeneralSQL Replication Conflicts Pin
Daminda31-Jan-05 19:09
Daminda31-Jan-05 19:09 
Generalretrieving datetime from recordset Pin
elephantstar31-Jan-05 8:49
elephantstar31-Jan-05 8:49 
GeneralRe: retrieving datetime from recordset Pin
WoutL31-Jan-05 10:59
WoutL31-Jan-05 10:59 
GeneralRe: retrieving datetime from recordset Pin
elephantstar31-Jan-05 11:14
elephantstar31-Jan-05 11:14 
GeneralTrigger Dates Pin
Tom Wright31-Jan-05 7:41
Tom Wright31-Jan-05 7:41 
GeneralRe: Trigger Dates Pin
Colin Angus Mackay31-Jan-05 9:38
Colin Angus Mackay31-Jan-05 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.