BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Store Integer array to SQL Binary field?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Feb 08, 2006 6:01 am    Post subject: How to Store Integer array to SQL Binary field? Reply with quote



I'm not having any success at something that should be (and probably
is) very simple:
I want to store an integer array into a SQL Server BINARY data field.
Psuedocode:


var MyIntArray : array[0..9] of Integer;


begin
(Fill MyIntArray with integers here)
Dataset.Active := true;
Dataset,Edit;
Dataset['MyBinaryField'] := MyIntArray;
Dataset.Post;
end;


Of course, this doesn't work. Delphi complains that the 'Variant' and
'Array' types are incompatible.


What's the most efficient way to make Delphi accept the array into the
data field? Perhaps the SQL field should be a different data type?

{Origianlly posted to ../Database/General Group - sorry for the
cross-posting, but this seemed to fit better here.]

TIA
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.