S
Shapper
Hello,
I have an ASP.NET/VB web page where I created a DataReader.
With the SQL Query String I use I always get 0 to 4 records.
The records have the following fields (I also include the MSSQL types):
[id] - int :: [name] - char :: [content] - varchar
I need to create N (DataReader Dimension) variables as follows:
For i = 1 to N
If [content(i)] Is Empty
var_[name(i)] = " "
If [content(i)] Is NOT Empty
var_[name(i)] = [content(i)]
EndFor
Consider the following records returned by the DataReader:
Id name content
1 hello hello world
2 goodbye goodbye world
3 nothing
I would need to create 3 variables:
var_hello = "hello world"
var_goodbye = "goodbye world"
var_nothing = " "
The [name] field is used to create the variable name and the [content]
field is used as the variable value.
Can someone tell me how to do this?
Thanks,
Miguel
I have an ASP.NET/VB web page where I created a DataReader.
With the SQL Query String I use I always get 0 to 4 records.
The records have the following fields (I also include the MSSQL types):
[id] - int :: [name] - char :: [content] - varchar
I need to create N (DataReader Dimension) variables as follows:
For i = 1 to N
If [content(i)] Is Empty
var_[name(i)] = " "
If [content(i)] Is NOT Empty
var_[name(i)] = [content(i)]
EndFor
Consider the following records returned by the DataReader:
Id name content
1 hello hello world
2 goodbye goodbye world
3 nothing
I would need to create 3 variables:
var_hello = "hello world"
var_goodbye = "goodbye world"
var_nothing = " "
The [name] field is used to create the variable name and the [content]
field is used as the variable value.
Can someone tell me how to do this?
Thanks,
Miguel