Call Toll Free!
   hosting packages   ::    about us   ::   support   ::   contact   ::   network   ::   F.A.Q.
    home
Hi-Performance

 

    Site Uptime

Programming in ASP

back to index

    1. Code Examples
    2. Connecting to MySQL
    3. ASP Programming Links

    1. Code Examples

    2. 
      
      <%
      response.write("Hello World!")
      ' how to create an array and print them to screen. Dim famname(5),i famname(0) = "Jan Egil" famname(1) = "Tove" famname(2) = "Hege" famname(3) = "Stale" famname(4) = "Kai Jim" famname(5) = "Borge" For i = 0 to 5 response.write(famname(i) & "<br />") Next
      ' open a text file for reading Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1) do while f.AtEndOfStream = false Response.Write(f.ReadLine) Response.Write("<br />") loop f.Close Set f=Nothing Set fs=Nothing
      ' see if a file exists Set fs=Server.CreateObject("Scripting.FileSystemObject") If (fs.FileExists("3dgarro.txt"))=true Then Response.Write("File exists.") Else Response.Write("File does not exist.") End If set fs=nothing

      %>

      top

    3. Connecting to MySQL

    4. 
      			
      <% strConnection ="driver={MySQL}; server=localhost; uid=benoneill; pwd=mypassword; database=databasename" Set adoDataConn = Server.CreateObject("ADODB.Connection") adoDataConn.Open strConnection strQuery = "SELECT * FROM your_table" Set rsData =adoDataConn.Execute(strQuery) If Not rsData.BOF Then Do While Not rsData.EOF Response.Write(rsData("your_field").Value) rsData.MoveNext Loop Else Response.Write("nothing found.") End If
      %>

      top

    5. ASP Programming Links

    6. here are some excellent sites that have help forums and code examples:
      :: w3 Schools
      :: ASP Resource Index
      :: Hot Scripts
      :: Many, many more...

      top

      back to index


©2000-2008 PerformanceHosting.net,Inc. All Rights Reserved. Privacy Policy