Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

most bizarre problem ever

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jhcorey@yahoo.com - 21 Oct 2005 13:51 GMT
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
Hans Kesting - 21 Oct 2005 15:56 GMT
> 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
[quoted text clipped - 7 lines]
> 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.
[quoted text clipped - 9 lines]
>
> Jim
jhcorey@yahoo.com - 21 Oct 2005 16:51 GMT
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.
UJ - 24 Oct 2005 14:18 GMT
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.
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.