views:

25

answers:

1

In the application I develop, the database table having a column of 'image' datatype. Now I want to insert the values into that table directly from my program, which is in VC++ 6.0, using a direct ExecuteQuery() of INSERT(due to performance considerations). The image column is been mapped to the structurre of the following declaration

typedef struct _DB_BLOB
{
  int size;
  char *data;
}DB_BLOB;

The data part will be dynamically filled.

A: 

If you can construct a hex representation of a string, this insert statement seems to work okay:

create table #test
(
    value image 
)

insert #test (value)
values (0x48656C6C6F207468657265)

But there may be size limitations (on the size of the query). It would be really really useful to be able to use managed code and ado.net. to set parameters.

Michael J Swart