J
jhcorey
I have a stored procedure that takes 14 parameters, including two for
start date and end date. The procedure then creates a sql string and
does an 'exec sql'.
The stored procedure always works correctly when I run it stand alone.
When I run it in my app, I sometimes get duplicate records, and
sometimes get no records. This is based on date range. I set the
range to 8/1/04 to 9/1/04, and I get a double set of records in the
dataset. If the range is 10/1/04 to 11/1/04, the dataset is correct.
If the range is later in 2005, I don't get anything.
I re-did the data access. I was using sqlhelper, so I just wrote
totally new code, but it didn't change anything.
The date parameters are datetime variables in sql, and the parameters
are declared this way in the vb.net code.
The procedure does a select against a view, but it's really not that
complicated. There's no unions or sub-selects or anything.
And as I said, it always works correctly in query analyzer.
I similar procedure in a classic asp app also works correctly.
Jim
start date and end date. The procedure then creates a sql string and
does an 'exec sql'.
The stored procedure always works correctly when I run it stand alone.
When I run it in my app, I sometimes get duplicate records, and
sometimes get no records. This is based on date range. I set the
range to 8/1/04 to 9/1/04, and I get a double set of records in the
dataset. If the range is 10/1/04 to 11/1/04, the dataset is correct.
If the range is later in 2005, I don't get anything.
I re-did the data access. I was using sqlhelper, so I just wrote
totally new code, but it didn't change anything.
The date parameters are datetime variables in sql, and the parameters
are declared this way in the vb.net code.
The procedure does a select against a view, but it's really not that
complicated. There's no unions or sub-selects or anything.
And as I said, it always works correctly in query analyzer.
I similar procedure in a classic asp app also works correctly.
Jim