Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet readonly from a stored procedure
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 4.0
Database:
MS SQL Server
Miscellaneous
Thread ID:
01489891
Message ID:
01491609
Views:
67
>Tim,
>
>The reason I mentioned the 'AS' clause was that I remember previously getting an error that said the dataset was read-only when I did use the rename clause. This would be true because it doesn't see the dataset as 'coming' from a 'real' table. Perhaps the fact that the procedure is using dynamic SQL is causing the problem with MM. If the other procedure that works does not use dynamic SQL then this might suggest this is the problem. Does the other procedure use dynamic SQL?
>
>
>>Bob, there isn't any columns being named specific but there is a cast in this.
>>
>>
>>/*
>>      SET NOCOUNT ON;
>>      DECLARE @SQL varchar(600)
>> 
>>      SET @SQL = 'SELECT 
>>            AddressNumber,
>>            ApartmentNumber,
>>            LastUpdated,
>>            LocationID,
>>            LocationTypeID,
>>            PostalCode,
>>            RecordStart,
>>            Status,
>>            StreetName,
>>            UpdatedBy
>>      FROM [dbo].[Location]
>>      WHERE 
>>            AddressNumber IN (' + @AddressNumbers + ') OR
>>            PostalCode = '+CAST(@PostalCode as varchar(10))
>>      EXEC(@SQL)
>>*/
>>
>>
Thanks for the tip Bob. I'm going to tuck it away. It sounds like something that could definitely trip me up in the future.

Don
Ronald D. Edge
Retired from Indiana University Mar 1, 2011

"You've got to be very careful if you don't know where you are going,
because you might not get there."
“When you come to the fork in the road, take it.”
--Yogi Berra
Previous
Reply
Map
View

Click here to load this message in the networking platform