VB Code:
<%@ Page Language = "VB" Trace = "true" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="System.Data.SqlClient" %>
<Script Runat="server">
Function Scriptname as string
Dim strURL,aryURL
strURL = Request.ServerVariables("SCRIPT_NAME")
aryURL = Split(strURL, "/", -1, 1)
Scriptname = (aryURL(ubound(aryURL)))
End Function
Sub Page_Load
'DB stuff
Dim SQLcon As SqlConnection, SQLcmd as SqlCommand, SQLread as SqlDataReader
SQLcon = New SqlConnection ( "Server=xxx.mysite4now.com;uid=xxx;pwd=xxx;database=xxx")
SQLcon.Open()
SQLcmd = New SqlCommand( "SELECT dir FROM NetFile WHERE user='core33' AND pass='test112'", SQLcon )
SQLread = SQLcmd.ExecuteReader()
While SQLread.Read()
Response.Write( SQLRead( "dir" ) )
End While
SQLread.Close()
SQLcon.Close()
End Sub
</script>