>CREATE PROCEDURE dbo.sp_bob (@cState as Char(2)) >AS > BEGIN > Select * from Accudata where State = @cState > END >>
>tcSqltext = "Exec sp_bob 'NY'" >lnConnect = SQLCONNECT(cODBC_name, cOdbc_login, cOdbc_password) > >IF lnConnect <= 0 > lnReturn = 0 > = MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error') >ELSE > lnReturn = SQLEXEC(lnConnect, tcSqlText, tcCursorName) > =SQLDISCONNECT(lnConnect) >ENDIF >>