Information générale
Forum:
Microsoft SQL Server
>I have a field "ATPre" VarChar(6) in a table that, for whatever reason, is only able to store first three characters of a default value when a record is added from one of the stored procedure. I know this sounds very weird but the correct default value of "SAT/LG" is set if:
>
>1. I add a new record via Enterprise Manager table view.
>2. Execute INSERT statement directly from Query Analyzer.
>3. Call a test stored procedure that calls a simple INSERT statement.
>
>However, a simple "INSERT Production (MatrixID) VALUES (@MatrixID)" statement within one of the actual production stored procedure adds just "SAT" as the default!
>
>This is really frustrating to say the least. I've worked with MSSQL for years and never had a similar problem before. I've checked code everywhere that the default might be overriden and can't find anything. What can be the problem? TIA.
John,
A very mysterious problem indeed!
Have you checked the actual SQL that is executed by the stored proc with Profiler? This might point you in the right direction.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement