Results 1 to 4 of 4

Thread: Stored Proc in SQL server

  1. #1
    Sadovod
    Guest

    Talking

    Is there a way to dynamically create Stored Procedure in ASP page using ADO for SQL server ?

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Kindly elaborate the application wherein you want to dynamically create stored procedures?

  3. #3
    Guest

    Talking

    I meant ASP page using ADO,
    say,

    connection.execute ("create stored procedure"),

    some how to store it in server and than to be able to
    execute it from ASP page

  4. #4
    Guest
    Yes, you can do this by executing straight SQL.

    Try this:

    connConnection.Execute("CREATE PROCEDURE spTest AS" & vbCRLF & "Select field1, field2 from myTable")

    This will create a stored procedure called spNew with the following SQL in it:

    Select field1, field2 from myTable

    When you open the sproc in EM, it looks like this:

    CREATE PROCEDURE spTestNew AS
    Select field1, field2 from content
    GO

    You can now execute this sproc as you would execute or use any other sproc.

    HtH

    Imar

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