[thelist] returning values through ASP function

Chris Blessing webguy at mail.rit.edu
Thu Mar 7 09:35:01 CST 2002


Instead of "return strCurrent" you have to assign the variable you want to
return (be it a string, number, etc.) to the function like this:

max_ld_sample = strCurrent

This is the equiv. to using the "return" statement.

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net

> function max_ld_sample(myValue)
>
> set OraDatabase = OraSession.getDatabaseFromPool(10)
> OraDatabase.AutoCommit = true
> dim strSQL
> strSQL = "SELECT MAX(SAMPNO) FROM LD_SAMPLE_IN_TABLE WHERE PROJNO LIKE
> '"&myValue&"'"
> Set OraDynaset = OraDatabase.CreateDynaset(strSQL, 0)
> strMAX_SAMPNO= OraDynaset.Fields("MAX(SAMPNO)").value
> set OraDynaset = nothing
> strCurrent = strMAX_SAMPNO
> 'Response.Write strCurrent
> return strCurrent
>
> end function
> </SCRIPT>




More information about the thelist mailing list