Click here to Skip to main content
15,889,335 members
Home / Discussions / Database
   

Database

 
GeneralRe: Copy data In table Pin
Mark J. Miller19-Feb-08 7:50
Mark J. Miller19-Feb-08 7:50 
GeneralRe: Copy data In table Pin
kibromg19-Feb-08 9:19
kibromg19-Feb-08 9:19 
GeneralRe: Copy data In table Pin
Mark J. Miller19-Feb-08 11:16
Mark J. Miller19-Feb-08 11:16 
GeneralRe: Copy data In table Pin
kibromg19-Feb-08 23:21
kibromg19-Feb-08 23:21 
GeneralRe: Copy data In table Pin
kibromg19-Feb-08 23:48
kibromg19-Feb-08 23:48 
GeneralRe: Copy data In table Pin
Mark J. Miller20-Feb-08 6:54
Mark J. Miller20-Feb-08 6:54 
GeneralAPPLICATION TO RUN EVERY FEW SECONDS Pin
kibromg21-Feb-08 5:27
kibromg21-Feb-08 5:27 
QuestionAdvice sought, how do I best handle saving an array in a SQL database? Pin
Per Sderberg19-Feb-08 5:06
Per Sderberg19-Feb-08 5:06 
Hi all,
I'm developing an application in Visual Studio 2005 using VB.NET. Now I would like to store the variables in a SQL database. Each member of the databse has roughly 1.000 values to store. But most of them are in arrays like this:
dim results(6, 50) as string

The VB-programme generates the values and thus I thought it would be possible to declare an array in the Database declaration like Results(index1, index2) and then index1.max = 6 and index2.max = 50, something like that.

And then I could add it like this:

myCommand.Parameters.AddWithValue("@mResults", Results)

I'm concerned for how to describe the input variables in the SQL Database. As far as I could tell it seems not possible?
I'm thinking that I will still have to give each and everyone of the 300 values a description, if it will allow nulls etc.

If I still have to do it that way then I guess a loop like this will also do the work:

for i as integer = 1 to 6

for j as integer = 1 to 50

myCommand.Parameters.AddWithValue("@mResults" & i.ToString & j.ToString, Results(i, j))

next

next

An other idea is of course to save the array as a text with delimiters between the values.

Or is there any smart way that I'm unaware of to store the arrays?
Any advice would be appriciated. I see a lot of work to first declare the 1.000 values and its equivalent code and so on. Of course, I'm planning to describe the arrays as seperate tables with the identical primary key.

Best, Per
GeneralRe: Advice sought, how do I best handle saving an array in a SQL database? Pin
Mark J. Miller19-Feb-08 8:26
Mark J. Miller19-Feb-08 8:26 
GeneralRe: Advice sought, how do I best handle saving an array in a SQL database? Pin
Per Sderberg19-Feb-08 21:41
Per Sderberg19-Feb-08 21:41 
QuestionHow do I merge data into one record Pin
KreativeKai19-Feb-08 4:16
professionalKreativeKai19-Feb-08 4:16 
GeneralRe: How do I merge data into one record Pin
Mark J. Miller19-Feb-08 8:12
Mark J. Miller19-Feb-08 8:12 
Questionimages in ms-access database. Pin
avvaru.murali19-Feb-08 2:43
avvaru.murali19-Feb-08 2:43 
GeneralRe: images in ms-access database. Pin
Kschuler19-Feb-08 10:49
Kschuler19-Feb-08 10:49 
Questionembedded database Pin
avvaru.murali19-Feb-08 2:36
avvaru.murali19-Feb-08 2:36 
GeneralRe: embedded database Pin
Colin Angus Mackay19-Feb-08 4:24
Colin Angus Mackay19-Feb-08 4:24 
GeneralProblem with update statement. Pin
matjame19-Feb-08 1:59
matjame19-Feb-08 1:59 
GeneralRe: Problem with update statement. Pin
Mark J. Miller19-Feb-08 8:32
Mark J. Miller19-Feb-08 8:32 
QuestionHow to retrive the transactions back using log files Pin
Satish - Developer18-Feb-08 23:07
Satish - Developer18-Feb-08 23:07 
AnswerRe: How to retrive the transactions back using log files Pin
Mark J. Miller19-Feb-08 8:35
Mark J. Miller19-Feb-08 8:35 
QuestionCan stored procedures retrun more than one value. Pin
Satish - Developer18-Feb-08 23:03
Satish - Developer18-Feb-08 23:03 
AnswerRe: Can stored procedures retrun more than one value. Pin
J4amieC18-Feb-08 23:20
J4amieC18-Feb-08 23:20 
AnswerRe: Can stored procedures retrun more than one value. Pin
Giorgi Dalakishvili18-Feb-08 23:26
mentorGiorgi Dalakishvili18-Feb-08 23:26 
Generalquery + access database Pin
ritu432118-Feb-08 20:40
ritu432118-Feb-08 20:40 
GeneralRe: query + access database Pin
Paddy Boyd19-Feb-08 0:22
Paddy Boyd19-Feb-08 0:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.