Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store result of a query in variable

Status
Not open for further replies.

nelco

Programmer
Apr 4, 2006
93
US
I am trying to store the result of this query:

Code:
Select Max(Cookie_ID) From CookieLeadSource

into a variable in VB.

Any ideas on how to do this?
 
Thanks Riverguy. It worked with ExecuteScalar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top