Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to read field of Binary[n] in SQL Server Table by TQuery?

Status
Not open for further replies.

smilife

Programmer
Dec 1, 2003
30
CN
How to access the Binary[n] field of SQL Server Table using TQuery?When n is enough large.
Use the AsString? If the Binary[m] or Binary[k](m,k <n) equal #13, can the Field be access completely?
 
Some years ago I found that the BDE would not read SQL Server binary fields, which it seems you have too.

You could try using ADO instead of BDE (which, if practical, I would recommend anyway).

You could convert to varchar or text (memo) in the select statement which is presumably what you are exploring. #13 would in the source would not be a problem. #0 might be though.

Good luck
Simon
 
To Simon:
Thanks for your idea!
Bde cannt read SQL Server binary fields? But how do i use ADO instead?
 
Instead of a TDatabase you use a TADOConnection.

Instead of TQuery and TTable you use TADOQuery and TADOTable. Or use TADODataset which can take a SELECT statement or table name.

I think ADO is included in Delphi 5 Enterprise and 6 professional and later/above.

The BDE is depreciated by Borland (not recommended for new projects). ADO is a Microsoft database access technology which works well with SQL Server and Access.

Good Luck
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top