Page 1 of 1

Writing a varbinary field

Posted: Wed 02 Aug 2006 18:04
by Khadaji
I have a variable length binary field. I am using Borland Builder 6 and have just downloaded the latest version of the SDAC.

All is going well, but I cannot figure out how to write to the varbinary field.

How do I do this with SDAC?

Thanks! :)

Posted: Thu 03 Aug 2006 11:06
by Jackson
There is a lot of ways to fill VARBINARY fields with values.
You can use something like this:

Code: Select all

var
  Values: variant;
begin
  Values := VarArrayCreate([0, 4], varByte);
  // Fill array
  MSQuery.Insert;
  MSQuery.FieldByName('c_varbinary').Value := Values;
  MSQuery.Post;
end;
For more information please see SDAC help and demos.