girishnair12345
New member
- Joined
- Dec 11, 2010
- Messages
- 4
- Programming Experience
- Beginner
Please help, Tell me how to make and retrieve data from database and pass numbers as column names.
I am using VB 2008 and used
SQLStr = "SELECT * FROM my_table Where column_name " & byt_loop
SQLCmd.CommandText = SQLStr
SQLdr = SQLCmd.ExecuteReader
If SQLdr.Read() Then
sng_CIR = SQLdr(byt_term - 9)
End If
SQLdr.Close()
and getting an error Index was outside the bounds of the array.
I am using VB 2008 and used
SQLStr = "SELECT * FROM my_table Where column_name " & byt_loop
SQLCmd.CommandText = SQLStr
SQLdr = SQLCmd.ExecuteReader
If SQLdr.Read() Then
sng_CIR = SQLdr(byt_term - 9)
End If
SQLdr.Close()
and getting an error Index was outside the bounds of the array.