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!

get rows - Program type out of range

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
0
0
GB
hi,

tested my sql to get the results i need, put it in a recordset and now im want to put it in an array using get rows.
but i get the following error
Code:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Program type out of range

it worked fine until i added this line to my sql
Code:
sum(datediff(cbb.bookend,cbb.bookst)) as days

full sql
Code:
SELECT CC.reg, CBB.bookst, CBB.bookend, CC.carid, CBB.courtcarbookid,tran.trandesc, CC.model, sum(datediff(cbb.bookend,cbb.bookst)) as days 
FROM courtcar AS CC 
LEFT JOIN (SELECT CB.bookst, CB.bookend, CB.carid, CB.courtcarbookid, CB.cusid FROM courtcarbook AS CB 
WHERE (cb.bookst BETWEEN '20070101' AND '20071231') OR (cb.bookend BETWEEN '20070101' AND '20071231') 
OR (cb.bookst <= '20070101') AND (cb.bookend >= '20071231')) AS CBB ON CC.carid = CBB.carid 
LEFT JOIN tran ON CC.tranid = tran.tranid 
LEFT JOIN cus ON cus.cusid = CBB.cusid 
WHERE display = 0 
GROUP BY CC.carid, month(cbb.bookst) 
ORDER BY CC.carid ASC, CC.makeid ASC, CBB.bookst ASC

the sql runs fine on its own - is this an sql or asp issue
any ideas welcome
 
Hope someone is still tracking this thread

My code works fine in SQL localhost, but when loading to mySQL web it fails with "Program type out of range"

the query is

lsSQlSelect = "Select sum(HoursWorked) as lsH from TimeEntry "
Set rsobjTimeSum = lsObjDBConn.Execute(lsSQlSelect)
lsHours = rsobjTimeSum("lsH")

Here I get the error

Any help appreciated
 
hi - found that the version of mysql was the problem
try upgrading to the latest version

cheers MG
 
Thanks, would you know what version of mySQL is the latest. I will contact the hosting service and request information
 
the latest community version is 5.0.45
good luck with your hosting company to change this!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top