Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet readonly from a stored procedure
Message
 
À
22/11/2010 06:58:06
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 4.0
Database:
MS SQL Server
Divers
Thread ID:
01489891
Message ID:
01490105
Vues:
47
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)
>*/
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform