Adotek wrote:
Hi All,
I am getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]Numeric value out of range
Nothing to do with your problem, but:
http://www.aspfaq.com/show.asp?id=2126
(null)
/database/data_entry.asp, line 90
Line 90 is shown below...
// count the total records by iterating through the recordset
for (rsProducts_total=0; !rsProducts.EOF; rsProducts.MoveNext())
{ <---- Line 90
rsProducts_total++;
}
I see nothing here that would cause your odbc driver to return an "out
of range" error. At this point in your code, results have already been
retrieved into your recordset so there should be nothing here for the
database engine or the odbc driver to complain about/
I can only assume that you are mistaken as to which line is actually
line 90. Do some error-trapping so you can determine the actual source
of your error.
However, I will say: this is an insa... I mean ... this is not the
recommended way to get a record count. If all you are doing is counting
the records, then you need to let the database engine do it for you:
sql="select count(*) from table where ... ";
set rs = conn.execute(sql,0,1);
rsProducts_total=rs(0).value;
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.