Dynamic SQL with TBytesField?
- From: "Paul Ritchie" <REMOVEpritchie@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 May 2005 23:17:39 +1200
When connecting to a SQL Server database with ADO a TIMESTAMP field appears
in the dataset as type TBytesField.
All I want to do is save it in a variable and use it when generating an
UPDATE statement.
Can anyone give me an example of how to use a TBytesField and to store it
presumably to a variable of type TByteArray? Also how can I render that
byte array as a string - I see this following SQL statement works fine for
me so I would just like to transform it to a string.
update fw_entitytables
SET TableName = 'TranDates'
where EntityTableID = 202
and RowVersion = 0x000000000000D481
I thought maybe something like this but can't get it to work.
var ByteArray : TByteArray
begin
i := 0;
s := '0x';
while i < ByteArray do begin
s := s + char(ByteArray[i]);
end;
end;
Any basic help on ByteArrays and TBytesField would be really appreciated!
kind regards,
Paul Ritchie.
.
- Prev by Date: Safest way to access the mssql server ovet the internet
- Next by Date: Re: Safest way to access the mssql server ovet the internet
- Previous by thread: Safest way to access the mssql server ovet the internet
- Next by thread: Error in post with ADOSQLServer
- Index(es):