hi, did i miss something on the code? im using gridview bound to sqldatasource, the data source use a valid stored procedure with temporary tables return through tsql select command but im not getting any result in gridview.
vb Code:
With requisition_detailSqlDataSource .SelectCommandType = SqlDataSourceCommandType.StoredProcedure .SelectCommand = "sp_tempweb_requisition_status" .SelectParameters.Add("@requisition_no", TypeCode.String, TextBox1.Text.ToString) requisition_detailSqlDataSource.DataBind() End With
there should be a better workaround to do that. thanks for the help.Code:ALTER PROCEDURE [dbo].[sp_tempweb_requisition_status] -- Add the parameters for the stored procedure here @requisition_no varchar(20) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here create table #tempweb_requisition_status(id varchar(20), lpono varchar(30), details varchar(50) ,unit varchar(30), req_qty float, rcvd_qty float, balance float, rcvd_from varchar(100)) insert into #tempweb_requisition_status(lpono, details,unit, req_qty,rcvd_qty,balance, rcvd_from) select ... where pk_=@requisition_no select * from #tempweb_requisition_status order by details END





Reply With Quote