Click to See Complete Forum and Search --> : delete function in stored procedure
jas_alien2
Sep 24th, 2000, 10:01 PM
can any one show me an example of delete function using stored procedure??
Do you mean Delete statement?
delete from tablename where col1 = "ABC"
jas_alien2
Sep 25th, 2000, 08:28 PM
nope not that one, i mean calling a stored procedure which deletes a certain record, pls help.. thanks
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.