i just added the 2 following sql commands to my coding as i need to get some data from a different database.
but it keeps throwing this error when i try to display the data from this new command:
here's the code i've used to display it
error '80020009'
Exception occurred.
/Internal Programs/Discount/breakdown_view.asp, line 139
this line points to the sql command i named SnapshotDiscounts( ). It gets the discount value for the 1st 2 suppliers but when it tries to get it for the 3rd the error comes up.
i checked on the net and microsoft are saying it hapens when you point to a text or memo field in the table. but all my fields are set as numbers.
the supplier it points to, 'B83M', doesnt exist in the table so it should just skip that supplier and move onto the next one but isnt working for some reason.
SQL:
but it keeps throwing this error when i try to display the data from this new command:
here's the code i've used to display it
Code:
if objrs6.eof or isNull(objrs6("DisMonth")) = true or objrs6("DisMonth") = "" then
DisMonth = "0"
else
DisMonth = objrs6("DisMonth")
end if
error '80020009'
Exception occurred.
/Internal Programs/Discount/breakdown_view.asp, line 139
this line points to the sql command i named SnapshotDiscounts( ). It gets the discount value for the 1st 2 suppliers but when it tries to get it for the 3rd the error comes up.
i checked on the net and microsoft are saying it hapens when you point to a text or memo field in the table. but all my fields are set as numbers.
the supplier it points to, 'B83M', doesnt exist in the table so it should just skip that supplier and move onto the next one but isnt working for some reason.
SQL:
Code:
sub GetSuppliers( )
SET objRs5 = SERVER.createObject( "ADODB.recordSet" )
dim mysql
mysql = mysql + ""
mysql = mysql + "SELECT Supplier, [net-turnover@"& myNewMonth &"] AS MonthTO "
mysql = mysql + "FROM usalanalysis "
mysql = mysql + "WHERE Customer = '"& objrs("Customer") &"' "
mysql = mysql + "AND [year-number] = '" & myYear & "' "
mysql = mysql + "ORDER BY Supplier"
'response.write(mysql)
'response.end
objRs5.OPEN mysql,objConn,1,3
end sub
sub SnapshotDiscounts( )
SET objRs6 = SERVER.createObject( "ADODB.recordSet" )
dim mysql
mysql = mysql + ""
mysql = mysql + "SELECT Supplier, [Sett@"& myNewMonth &"] AS DisMonth FROM Settlement_Out "
mysql = mysql + "WHERE [Year-Number] = "& myYear &" "
mysql = mysql + "AND Supplier = '"& objrs5("Supplier") &"' "
mysql = mysql + "ORDER BY Supplier"
response.write(mysql)
'response.end
objRs6.OPEN mysql,objConn3,1,3
end sub