Thank you for responding, Miha
This is all of the code
<script runat="server">
Dim ConnectString, SelectStatement as String
Dim Connect as OleDbConnection = New
OleDbConnection
Dim Adapter as OleDbDataAdapter = New
OleDbDataAdapter
Dim EpostCB as OleDbCommandBuilder
Dim EpostDS as DataSet = New DataSet
Dim Row as DataRow
Dim IdGuestHent As Integer
Sub SubmitRed_Click(Sender As Object, E As EventArgs)
IdGuestHent = Request.QueryString("IDGuest")
HentListe(0)
Row = EpostDS.Tables("TblGuest").NewRow
Row.Item("Fornavn") = AFornavn.Text
Row.Item("Etternavn") = AEtternavn.Text
Row.Item("Epost") = AMail.Text
Row.Item("Kommentar") = AKommentar.Text
Row.Item("Dato") = Today
EpostDS.Tables("TblGuest").Rows.Add(Row)
Adapter.Update(EpostDS,"TblGuest")
If EpostDS.HasErrors Then
Melding.Text = "Det skjedde en feil" &
EpostDS.Tables("TblGuest").Rows(0).RowError
Else
Melding.Text = "Takk, Du er nå lagt inn i
gjesteboka!"
AFornavn.Enabled = False
AEtternavn.Enabled = False
AMail.Enabled = False
AKommentar.Enabled = False
SubmitRed.Enabled = False
End if
End Sub
Sub HentListe(IdGuestHent as integer)
SelectStatement = "SELECT * From TblGuest WHERE
IDGuest = " & IdGuestHent
ConnectString
= "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data
Source=D:\Webspace\agder.fhs.no\db\WebBase.mdb"
Connect.ConnectionString = ConnectString
Adapter.SelectCommand = new OLeDbCommand
(SelectStatement, Connect)
EpostCB = New OleDbCommandBuilder(Adapter)
Adapter.Fill(EpostDS,"TblGuest")
End Sub
Regards
John