473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

most bizarre problem ever

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

Nov 19 '05 #1
3 1014
> 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.
Let's ask the obvious first:
You are sure that the data itself is correct? First range contains
no double data, ranges later in 2005 do contain data?

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

Nov 19 '05 #2
To be honest I haven't looked at the raw data. I'm relying on the
results of the stored procedure when I run it in query analyzer.

But I imagine the answer will be obvious and that double-checking
everything (again) will show me something.

Nov 19 '05 #3
UJ
Try using SQLProfiler - then you can see the exact call that is made to SQL.
You can then run it in Query Analyzer and make sure your getting the correct
results.

J.
<jh*****@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
To be honest I haven't looked at the raw data. I'm relying on the
results of the stored procedure when I run it in query analyzer.

But I imagine the answer will be obvious and that double-checking
everything (again) will show me something.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The Plankmeister | last post by:
This really is very strange... Have a look at this: http://www.plankmeister.org.uk/new/index.html in IE6. When it loads, the top section is blank. If you mouseover anything in the menu half of...
0
by: Mark | last post by:
We're authoring a VS 2005 app that includes several EXE's and DLL's and also uses a COM component (a customer requirement). The COM component provides a graphic image to be used by the .NET app;...
3
by: Peter | last post by:
Hi! I am having some very strange behavior with my databound controls. It's taken a long time to isolate exactly what is provoking the problem, but I'm still leagues away from solving it. I...
12
by: Gerhard | last post by:
This is bizarre... Im having problems with the combobox AfterUpdate event: Im running Access 2003. I created an unbound combobox with 3 columns on a form. The Row Source is from a table....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.