Recordset filltered by dates does not work in Firefox (works fine in IE)
Posted on 2006-11-10
everything works inIe but in Firefox I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting datetime from character string.
The code generated by Dreamweaver is the following:
var DAvail = Server.CreateObject("ADODB.Recordset");
DAvail.ActiveConnection = MM_tswdata_STRING;
DAvail.Source = "SELECT DateAvailable, RoomType, Block, Segment, NumberAvailable FROM dbo.t_TypeAvailability WHERE (NumberAvailable > 3) AND (Block = 'owner') AND (Segment = 'owner use') AND (RoomType='"+ DAvail__Bdrm.replace(/'/g, "''") + "') AND DateAvailable >= '"+ DAvail__Begin.replace(/'/g, "''") + "' AND DateAvailable<'"+ DAvail__End.replace(/'/g, "''") + "'";
DAvail.CursorType = 0;
DAvail.CursorLocation = 2;
DAvail.LockType = 1;
var DAvail_numRows = 0;
Any suggestions will be appreciated.