Question on asp variables & arrays

liunx

Guest
:D Finally got some time to sit down and try out ASP.
Okay few questions...

First is, how do I create a array of variables?
Then how do I call on each one seperately?

I want to set up the array to hold a couple
of Response.Write() values, mainly to check
the visiter's browser, method, IP, server port, etc.

Then be able to call on them one @ a time;
Also, can ASP be used with MySQL?

If so, can anybody point me in the direction
of how to?Using multiple dimension arrays you can find out how many dimensions by using ubound function. You can make as many dimension as there is memory 8 MB in 2K only 1 MB on XP/2003 boxes. You can ask for more memory than allowed by default.

For i = 0 to Ubound(ary,2) ' 2nd arguement is the array is
' dimension if returns -1 then there is no dimension there.
Next<table border="1">
<%for i=0 to ubound(myArray,2)
response.write("<tr>")
for j=0 to ubound(myArray,1)
response.write("<td>" & myArray(j,i) & "</td>")
next
response.write("</tr>")
next%>
</table>


That is some quick code you can use to cycle through any multidimensional array to get a table with all the info in it.

Once you get the idea of what every part of that code does, then you should be all set with multi-dim arrays.Thanks :) Now the big question...
Using MySQL with ASP (<!-- m --><a class="postlink" href="http://www.mazsoft.com/mysql.asp">http://www.mazsoft.com/mysql.asp</a><!-- m -->)

Can't figure out what he means by
"global.asa" though; :confused: any help?global.asa files are like application events. Events like Application_OnStart
""_OnEnd
Session_OnStart
""_OnEnd

all function definitions for those events must be there. Application variables are best set in the App OnStart Event, Like connection strings. The Session OnEnd Event can not use Server.CreateObject because there is no way of telling when this even might fire.

MySql can run with ASP if you install the ODBC drivers for it on Windows.English there, Afterburner? :confused:
Like where this file is, where do I and
how do I add that code, etc. ?

Also where do I find these ODBC drivers?
(Never mind.. found it on MySQL.com :o )File file must exist in the root of the application.

The application is defined by the Root Web or a Sub Web.

You add script tags with the language that your using along with the runat="server" directive in the tag. and your all good.

<!-- m --><a class="postlink" href="http://www.devguru.com">http://www.devguru.com</a><!-- m --> has more information about the global.asa file.
 
Back
Top