Results 1 to 4 of 4

Thread: passing from select statement into a variable

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    9

    Unhappy passing from select statement into a variable

    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!

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    i'd do a search on google for ado.net tutorials if i were you.
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Look into the Command object, Connection object, the Command's Execute scalar function to do what you want.

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    9
    thanks, will do!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width