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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem return all records from query using FP web pages

Status
Not open for further replies.

AndyLord

Programmer
Jun 30, 2004
45
GB
Not sure if I'm in the right forum, but here goes...
I am working on a project, which has been previously developed, using Frontpage 2002, SQL Server 2000.
I have query, saved as stored procedure no SQL SERVER. which will return records between a start and end date. This works fine in SQL SERVER, all records are returned, but when entering the dates on the web pages it will return the records minus 1, in other words either the first or last record is missing. Can not understand why this is happening. Looked at the issue of mm/dd/yyyy and dd/mm/yyyy date formats. Used (CAST(FLOOR(CAST(DATEFIELD AS float)) AS smalldatetime) >= @startDate) for the STARTDATE and ENDDATE. I am completley stuck. Can anyone provide any help with this problem. If any further information is required please inform me.
Example of the query

"SELECT hdk.PHX_Problems.problemID, hdk.PHX_Categories.Category, hdk.PHX_Problems.createDate, hdk.PHX_Problems.Details,
hdk.PHX_Problems.contactName, hdk.PHX_Staff.userName
FROM hdk.PHX_Problems INNER JOIN
hdk.PHX_Staff ON hdk.PHX_Problems.empid = hdk.PHX_Staff.empid INNER JOIN
hdk.PHX_Categories ON hdk.PHX_Problems.categoryID = hdk.PHX_Categories.categoryID
WHERE (CAST(FLOOR(CAST(hdk.PHX_Problems.createDate AS float)) AS smalldatetime) >= @startDate) AND
(CAST(FLOOR(CAST(hdk.PHX_Problems.createDate AS float)) AS smalldatetime) <= @endDate) AND (hdk.PHX_Problems.status = 'Closed')
ORDER BY hdk.PHX_Problems.createDate DESC"

@StartDate and @EndDate are parameters passed from the web page.
The project uses ASP VBScript Class functions/ modules (I'm not the greatest at explaining, which helps hey!) for permissions, db connections etc.
The web pages use VBScript.
Many thanks in advance.
 
Assuming that you are NOT using the FP database results region, rather custom ASP scripts - I think you might get better help in a ASP or VBscript forum. It doesn't look to me that the problem you are having has anything to do with FP necessarily.

I'm not saying this is posted in the wrong forum, btw! Just that you may get better help for the specific ASP/VBscript issue in a more specific forum with those guru's :)

Tiffany

Microsoft MVP - FrontPage
 
Noconi

Thanks for the advice. I will try the ASP and VBSCript forums.

Cheers

Andy [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top