Link to home
Start Free TrialLog in
Avatar of AWestEng
AWestEngFlag for Sweden

asked on

Save double array to sql server 2008

Hi!

I need some tips how I should save a double array in my sql server 2008 database

So if I have a double array with 50 000 positions I like to insert this data to a column in my table, any tips?

Avatar of momi_sabag
momi_sabag
Flag of United States of America image

do you need to be able to access each position or would you select and update all positions every time?
if you need specific access, i would create a table like
row, col, value
that will have 50000 rows
if you need all the values each time, i would store it as xml or binary value
Avatar of cyberkiwi
Do you mean as a column in a single record?
XML is a pretty good means of storing that, SQL will support querying by XPath when you need the data again.
If you mean 50,000 rows, then split it into two columns, so you have your db record/col = array[dim1,dim2]

Or are you after C# code?
Avatar of AWestEng

ASKER

I like to save all data in one row and one column in the database, so xml sounds fine
the array is 1-Dimension [x1,x2,x3,x4]
Yes, I need help with some C# code to do this
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial