|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
HELP please, with function that returns an array
I'm trying to write a function that returns an array and I can't figure it out.
I know this is a very newbie question but I am new to ASP Here's the function: Dim rs, page_id, con, data_source data_source = "Provider=SQLOLEDB.1;Password=pword;Persist Security Info=True;User ID=user_name;Initial Catalog=adb;Data Source=someIpAddress" Set con = Server.CreateObject("ADODB.Connection") con.Open data_source Set rs = Server.CreateObject("ADODB.Recordset") Set rs.ActiveConnection = con rs.Open "select max(id) as cur_record from mortgage_rate where page = 'h'" page_id = rs("cur_record") rs.Close page_id_cvt = CInt(page_Id) rs.Open "select * from mortgage_rate where id = " & page_id_cvt page = rs("page") rate = rs("rate") Response.Write(rs("rate")) ap_rate = rs("ap_rate") caps = rs("caps") term_id = rs("term_id") points = rs("points") payment = rs("payment") last_date = rs("date_last_modified") SimpleRates = array(page, rate, ap_rate, caps, term_id, points, payment, last_date) rs.Close con.Close end function |
|
#2
|
|||
|
|||
|
not sure about this one, but just for ****s and giggles try this:
set SimpleRates = array(page, rate, ap_rate, caps, term_id, points, payment, last_date) and also when you call the function use set i.e. set blah = simpleRates() |
|
#3
|
|||
|
|||
|
Thank you very much.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > HELP please, with function that returns an array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|