Ak ja - havde besøg af TDC, som endte med ikke at tjekke forbindelsen, fordi der nu var "problemer i Jylland". Lørdag fejlmeldte vi så IGEN og fik en teknikker i røret. Han kunne så ikke umiddelbart hjælpe, men lovede at vi ville blive ringet op søndag af en "der vidste noget mere". Det blev vi også - og denne teknikker endte IGEN med blot at fejlmelde linien.
Nok om mine private frustrationer...
Har fået det her til at virke:
I Global.asax ligger:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Application("ConnString") = "MinConnString"
End Sub
Login.aspx:
<%@ Page CompilerOptions='/R:"C:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"' Language="vb" AutoEventWireup="false" Codebehind="WebForm2.aspx.vb" Inherits="WinWeb.WebForm2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm2</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="
http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<ASP:DataGrid id="oDataGrid" Runat="server">
</ASP:DataGrid></form>
</body>
</HTML>
login.aspx.vb:
Imports System.Data
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents oDataGrid As System.Web.UI.WebControls.DataGrid
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oConnection As Odbc.OdbcConnection = New Odbc.OdbcConnection(Application("ConnString"))
Dim sSQL As String = "SELECT * FROM adgang"
Dim oDataAdapter As Odbc.OdbcDataAdapter = New Odbc.OdbcDataAdapter(sSQL, oConnection)
Dim oDataSet As DataSet = New DataSet
oDataAdapter.Fill(oDataSet)
oDataGrid.DataSource = oDataSet
oDataGrid.DataBind()
End Sub
End Class