Execute procedure with openrowset from ASP | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Execute procedure with openrowset from ASP

I wrote store procedure that can’t be execute from asp page but in sql query analyzer can. The procedure takes two columns from excel and update two columns in table "tbl_table1" Store procedure is: CREATE PROCEDURE test1 AS INSERT INTO tbl_table1 (code,price) SELECT * FROM OPENROWSET(‘Microsoft.Jet.OLEDB.4.0′,’Excel 8.0;Database=D:Inetpubdomainhttpdocsdb_dataexcelupdate.xls;HDR=YES’, ‘SELECT code,price FROM [Sheet1$]’)
GO And asp code: set rs_sql=server.CreateObject ("ADODB.Recordset")
rs_sql.open "execute test1 " ,cnn_sql,3,2 Any idea why this procedure can’t be called and executed from asp page?
Thank you!
Why don’t you run the INSERT process from ASP than calling SP that refers linked server. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing.