find connection fejl
<%@ IMPORT Namespace="System.Data" %><%@ Import Namespace="System.Data.OleDb" %>
<script language="vb" runat="server">
Sub Page_Load()
Dim StrConnection as string="provider=Microsoft.Jet.OLEDB.4.0;"
strConnection+="Data Source=data.mdb;"
data_src.text=strConnection
Dim objconnection as New Oledbconnection(strConnection)
try
objConnection.open()
con_open.text="Forbindelse er åben<br/>"
objConnection.Close()
con_close.text="Forbindelse er lukket<br/>"
catch e as Exeption
con_open.text="fejl"
con_close.text=e.Tostring()
end try
end sub
</script>
<html>
<body>
<asp:label id="data_src" runat= "server"/><br />
<asp:label id="con_open" runat= "server"/><br />
<asp:label id="data_close" runat= "server"/><br />
</body>
</html>
