PDA

Click to See Complete Forum and Search --> : passing from select statement into a variable


grob
Jan 12th, 2004, 07:22 AM
I'm a newbie at programming for asp.net. My question i think is a simple one.

I need to pass the result of a SQL select statement into a variable.

var1 = "Select Company_name from Employee where ID = 615"

will this work? Do i need to run everything separately? any help is greatly appreciated.

Thanks!

nswan
Jan 12th, 2004, 08:28 AM
i'd do a search on google for ado.net tutorials if i were you.

hellswraith
Jan 12th, 2004, 08:51 AM
Look into the Command object, Connection object, the Command's Execute scalar function to do what you want.

grob
Jan 12th, 2004, 08:52 AM
thanks, will do!