I need to gather information from an SQL query. I am using a SQL Data Source control because I will be using it in a grid view after I get the data.
My query looks like this: [wrapped for readability]
SqlDataSource1.SelectCommand = "SELECT [index] AS idex, store_number AS snum,
store_name AS sname, store_username AS suser, store_password AS spass,
store_count AS scount
FROM Stores
WHERE store_name = '" & Session("storename") & "'"
Very sloppy, but hopefully will work for what I need. The little I understand about variables should mean that the field of index should be stored to a variable named idex? is this correct? How do I use it later?
How do I take a variable from the column and put it in something like a text box,
should mean that the field of index should be stored to a variable named idex? is this correct?" That is absolutely not correct. To help you more, it would nice to see more of your code.