Mar 18, 2009 #1 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?
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?
Mar 18, 2009 #2 RiverGuy Programmer Jul 18, 2002 5,011 US Look at the SqlCommand.ExecuteScalar() function. Upvote 0 Downvote
Mar 18, 2009 Thread starter #3 nelco Programmer Apr 4, 2006 93 US Thanks Riverguy. It worked with ExecuteScalar. Upvote 0 Downvote