Send to Variable instead of listbox

Good evening,
I have become proficient at writing a sql query and sending the resulting data to a listbox, using the baseball demo as guidance.

What would I do different if I wanted to send a single query result to a string variable, instead of a listbox.

I can post the baseball team demo code, but I am assuming folks are familiar with it.


dim w, x, y, z as string w = data.Field("ID").StringValue x = data.Field("Name").StringValue y = data.Field("Coach").StringValue z = data.Field("City").StringValue

[code]Dim BBD_ID, BBD_Name, BBD_Coach, BBD_City as string

BBD_ID = data.Field(“ID”).StringValue
BBD_Name = data.Field(“Name”).StringValue
BBD_Coach = data.Field(“Coach”).StringValue
BBD_City = data.Field(“City”).StringValue[/code]

Then, later in the code, you will type bbd + Tab and choose the one you want…