Results 1 to 4 of 4

Thread: delete function in stored procedure

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Unhappy

    can any one show me an example of delete function using stored procedure??

  2. #2
    Guest
    Do you mean Delete statement?

    delete from tablename where col1 = "ABC"

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9
    nope not that one, i mean calling a stored procedure which deletes a certain record, pls help.. thanks

  4. #4
    Guest

    First, Stored procedure to delete a row:

    create procedure Procname
    @colval varchar(10) as
    delete from tablename where col1 = @colval


    To execute the stored proc from your VB code:

    dim conn as ADODB.Connection
    Set conn = New ADODB.Connection
    conn.ConnectionString = strConnectString ' specify your connect string

    conn.Open

    conn.execute "Procname 'ABC'",,adcmdStoredProc + adExecuteNoRecords

    Hope this helps.

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