Hi,
We are in the process of moving servers and the new server has MSSQL 2005 (we are currently using MSSQL 2000).
Everything is going fine apart from a problem with the date format.
For the also bought feature we are getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
/shopalsobought.asp, line 142
The code it is referring to is this:
Sub Getalsoboughtproducts (incatalogid, productlist)
dim orderdbc, orderlist, ordermax, count, productmax, catalogid
dim orderdate, sql, rc, rs, orderid, months
orderlist=""
productlist=""
months=getconfig("xalsoboughtmonths")
if months="" then months=12
orderdate =dateadd("m",-months,date())
count=0
ordermax=50
productmax=50
' bypass if mysql which cannot handle sql HK
' xxx
openorderdb orderdbc
sql="SELECT oitems.catalogid, orders.orderid FROM orders "
sql=sql & " INNER JOIN oitems ON orders.orderid = oitems.orderid "
sql=sql & " WHERE (orders.odate>=" & datedelimit(orderdate)
'VP-ASP 6.50 - show parent product instead of child product
dim ishighersql, ishigherrs
ishighersql = "select hassubproduct from products where catalogid = " & incatalogid
set ishigherrs=orderdbc.execute(ishighersql)
if not ishigherrs.eof then
if ishigherrs("hassubproduct") = "Yes" then
sql=sql & " AND oitems.catalogid IN (select catalogid from products WHERE highercatalogid = " & incatalogid & "))"
else
sql=sql & " AND oitems.catalogid=" & incatalogid & ")"
end if
else
sql=sql & " AND oitems.catalogid=" & incatalogid & ")"
end if
closerecordset ishigherrs
'debugwrite sql
set rs=orderdbc.execute(sql)
Line 142 refers to the last line in the above code.
Pulling my hair out at this so any help appreciated.
Steve
Sex toys from a UK sex shop including vibrators and dildos.