I see, so it should be like:
dim objConn
dim strConnString
if that is the case, that is happening already.
Based on the example given earlier by bigfoot,
I am still getting slammed by a ton of errors.
This is how I tried to integrated bigfoot's code with mine.
Below this code is the errors that it generated.
I will at least like to get beyond this connections thing.
This is not the way I had wanted to be initiated to this .net framework.
Please take a look:
<%@ Page Language="vb" Debug="true" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="ListJustification.WebForm1"%>
<HTML>
<HEAD>
<TITLE>View Justifications</TITLE>
</HEAD>
<BODY>
Dim strQuery As String = "SELECT * FROM tbl_events ORDER BY eventID"<BR>
objConnection = New SqlConnection(strConnection)<BR>
objConnection.Open()<BR>
Dim dbComm As New SqlCommand(strQuery, objConnection)<BR>
Dim reader As SqlDataReader = dbComm.ExecuteReader()<BR>
<BR>
reader.Read()<BR>
<BR>
If IsDBNull(reader.GetValue(0)) Then 'First field = 0<BR>
txtSomeTextbox.Text = ""<BR>
Else<BR>
txtSomeTextbox.Text = reader.GetValue(0)<BR>
End If<BR>
<BR>
reader.Close()<BR>
objConnection.Close()<BR>
<link rel="alternate" media="print" href="printversion.ext">
<font size="+3" face="arial">List Of Justifications</font><hr>
<ul>
<%
dim RS
Do While NOT RS.EOF
%>
<li>
<a href='displayJustification.asp?eventID=<%=RS.Fields("eventID"

%>'>
<%=RS.Fields("SpecName"

%>
</a>
<br>
<%
RS.Movenext
loop
%>
</li>
</ul>
</BODY>
</HTML>
/***************************************
errors that followed
***************************************
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE>The source code that generated this unhandled exception can only be
shown when compiled in debug mode. To enable this, please follow one of the
below steps, then request the URL:<BR><BR>1. Add a "Debug=true" directive at the
top of the file that generated the error. Example:<BR><BR> <%@ Page
Language="C#" Debug="true" %><BR><BR>or:<BR><BR>2) Add the following section
to the configuration file of your
application:<BR><BR><configuration><BR> <system.web><BR> <compilation
debug="true"/><BR> </system.web><BR></configuration><BR><BR>Note
that this second technique will cause all files within a given application to be
compiled in debug mode. The first technique will cause only that particular file
to be compiled in debug mode.<BR><BR>Important: Running applications in debug
mode does incur a memory/performance overhead. You should make sure that an
application has debugging disabled before deploying into production
scenario.</CODE> </TD></TR></TBODY></TABLE><BR><B>Stack Trace:</B> <BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>
[NullReferenceException: Object variable or With block variable not set.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
ASP.WebForm1_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()
</PRE></CODE>