Writing a varbinary field

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Wed 02 Aug 2006 18:01

Writing a varbinary field

Post by Khadaji » Wed 02 Aug 2006 18:04

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! :)

Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Thu 03 Aug 2006 11:06

There is a lot of ways to fill VARBINARY fields with values.
You can use something like this:

Code: Select all

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

Post Reply