Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing ASP SQL Code to Stored Proc

    After wading around in Books Online and trying out things in Query Analyzer, I thought I'd ask the WOWers...

    It occurred to me I could just use ASP to build a SQL string and pass it to a stored proc (perhaps use xp_executeSQL) so that the code is segregated from table-level interaction. I haven't gotten very far in setting this up, however, mainly because I have a hard time parsing books online and my other reference books tend to be broad and shallow in their coverage. I do know what I think the stored proc should look like and do.

    It should have an input param for loading the SQL String and an output param to give me the ID of the inserted data via Scope_Identity. This stored proc would replace all instances of INSERTs throughout the web app.

    Any ideas/suggestions?

    TIA

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing ASP SQL Code to Stored Proc

    Sounds like you're in need of an abstracted data layer. Check out the concept of Object/Relationship Mapping software. One that I really like is My Generations.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing ASP SQL Code to Stored Proc

    hmmm... looks interesting. unfortunately, I am working on a project in ASP Classic, not .NET (we will be transitioning to .NET once the new servers and domain come in), so the d00dads tool doesn't seem to apply.

Posting Permissions

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