Date parameters being truncated | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Date parameters being truncated

A little background on my project. I manage an asp.net project that consumes data from databases on several different servers. Each of the databases have the same schema. I create a new stored procedure and so far deployed to two databases. It has about a dozen input parameters two of which are datetimes. When I call the proc on the 1st database from my application it works fine. When I change it to connect to the 2nd database the values passed for those dates are being contained in double single quotes. I figured this out by using the profiler. In other words it looked like this:
@StartDate=”2007-09-01”,@EndDate=”2007-09-15”
So this is causing an error. I first assumed it was my code in asp.net. But since the same code worked on the 1st database, I’m beginning to think it has something to do with the database itself. Is there some kind of configuration that controls this?
Thanks

Hi, If you are calling same SP from ASP on two different db’s which are same in all aspect of design, then there should not be any conflict.
Check the profiler for SP call statement for both db’s which I feel would be same.
Also what kind of error do you get when sp of second db is called.

]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |