SQL Field to Variable?

Discussion in 'C#' started by timophy, Jan 3, 2007.

  1. #1
    I feel like an idiot for asking this - but how the heck do I assign a database field to a variable in ASP.net 2.0??

    in classic asp i would do this
    How do i do this in ASP.net 2.0? Thanks.
     
    timophy, Jan 3, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    ohh man, the new data access layer in asp.net 2.0 is gonna flip your lid! You can run/test/build (with Enterprise Manager) all queries inside of VS.NET without ever touching any other DB tools.

    Essentially, your going to want to create a folder called App_Code in your project root. Then Right Click, add the data access layer, (it should create like a .xss and another file or something)

    Anyways, when you play aroudn with these, you'll love them, have them read off a web.config connectionstring. then (sorry for the miss-spellings, I'm drunk right now) but then, when you create the queries graphically in this data layer, everything is now intellesense'd for yah! Its unbelievable!
     
    ccoonen, Jan 4, 2007 IP
  3. timophy

    timophy Active Member

    Messages:
    463
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Thanks for the response. I'll look into that.
     
    timophy, Jan 9, 2007 IP