Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Shows different results for a query - Why ? 2

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
0
0
US
Hi,
can anyone help me with a solution for thread333-119057 ? Thank you...
RR

 
I got a bit confused with what your problem was.
However, I know that I have had HUGE problems with date formats, with different computers getting different results when using the same asp page and the same database.....
I now try to always format the month in letters.
Here is a bit in asp to help....

><% dim l_Months
l_Months= Array(&quot;&quot;,&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;)
%>

.
.
.

<% dt = date()
day = datepart(&quot;d&quot;,dt)
mnt = l_Months(datepart(&quot;m&quot;,dt))
yr = datepart(&quot;yyyy&quot;,dt)
dateone = &quot;'&quot;&mnt&&quot; &quot;&day&&quot; &quot;&yr&&quot;'&quot;
Query = &quot;SP_MY_SP &quot; & dateone
%>
 
Difficult to help without knowing more details but a workaround could be to create the query as a stored procedure in the database and run the stored procedure (rather than the query) from the ASP.
 
Thank you Neill and Thank you Linda. And Apologies too..

It was all my mistake..
I was using a variable to count the records, instead of RecordCOunt.

That variable got stuck outside the loop and was freaking me out all this time.. I noticed it and killed it and used RecordCount.

Now it is fine.. I sincerely apologise.. Thank you very much. Thank you...
RR

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top