Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Strange Behavior when using strongly typed dataset

Author  Topic 

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-07-28 : 21:43:57
Does anyone know why this works.

If you create a store procedure with a tmp table


create proc Sproc_Test
as

Select 1 as mycol
into #tmp


Select * from #tmp



When using .net dataset designer it can not create the data set.

the workaround I found is by adding this code


Alter proc Sproc_Test
as
IF 1=0 BEGIN
SET FMTONLY OFF
END

Select 1 as mycol
into #tmp


Select * from #tmp



the code

IF 1=0 BEGIN
SET FMTONLY OFF
END

being added to the top of the procedure allow .net dataset designer to properly create a dataset.

Anyone know what this works?
   

- Advertisement -