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.
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.