Both ideas are very helpful. I'll definately be visiting that sql site a lot. I'm not sure about BLOBs though, is it just like a catch all. Where if you can't save data as something better, just save it as a BLOB? As you can imagine a google search for BLOB gives me a general definition and not much more. Thanks again for the help.

Allan, Mark wrote:
Indeed storing the array as a BLOB is the best way to store this.

To store a blob you will need to use the following syntax I believe:-

INSERT INTO <table_name> (NAME, NUMBERS) VALUES (<the_name>,?)

And will need to bind the array to the SQL query after using 
sqlite3_bind_blob(). There is documentation on this on the Web site and in the 
API header file.

At least this is what I have to do to store a blob. We use binary blobs to 
store a binary dump of test data which is basically only an array of data.

Hope this helps ,but I'm sure someone else will post something more helpful 
than me.

Mark



-----Original Message-----
From: Kevin Piciulo [mailto:[EMAIL PROTECTED]
Sent: 15 May 2006 17:31
To: [email protected]
Subject: [sqlite] C++ Arrays in sqlite


  Hey everyone,
This may not be the place to ask (if not please direct me.) I'm relatively new to sql, and newer to sqlite. Through experimenting i've figured out how to add a string to a table, create a table, remove a string, some basic stuff like that.

What I'd like to do is add an array to my table. For example: i have 2 columns, Name,and Numbers. Numbers needs to hold an array for each entry under Name. That is each name has it's own array.

I tried to learn a little about BLOBs, but aside from the fact that they're Binary Large Objects I didn't find much. Is a BLOB what I'd use to store information in this way?

  I appreciate any help or direction you guys can give.
     Kevin




DISCLAIMER:
This information and any attachments contained in this email message is 
intended only for the use of the individual or entity to which it is addressed 
and may contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution, forwarding, or copying of this communication is 
strictly prohibited.  If you have received this communication in error, please 
notify the sender immediately by return email, and delete the original message 
immediately.



Reply via email to