can any one show me an example of delete function using stored procedure??
Printable View
can any one show me an example of delete function using stored procedure??
Do you mean Delete statement?
delete from tablename where col1 = "ABC"
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.