hi
das schaffst so z.b.
Dim iCmd As New OleDbCommand
Dim iCmd1 As New OleDbCommand
Dim iCmd2 As New OleDbCommand
Dim insertCmd As String
Dim connStr As String
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;"
connStr += "Data Source= C:\Inetpub\wwwroot\DataTable.mdb;"
' Verbindung zur Datenbank herstellen
Dim conn As New OleDbConnection(connStr)
conn.Open()
'SQL-Command erstellen und ausfüheren
dim sqlCom as String= "SELECT * FROM DatenTb"
Dim com as new OleDBCommand(sqlcom, conn)
username= System.Environment.UserName
' userName = Context.User.Identity.Name
'userName = userName.Substring(userName.IndexOf("\") + 1)
If IsPostBack Then
iCmd.Connection = conn
'txtInfo.InnerHtml = "The current user of the computer is: " & username
'platzhalter für DataName
iCmd.Parameters.Add("@Filename", txtSaveAs.Value)
iCmd.Parameters.Add("@Autor", userName)
iCmd.Parameters.Add("@Thema", ThemeSelect.Value)
iCmd.Parameters.Add("@Abteilung", AbtSelect.Value)
iCmd.Parameters.Add("@Ziel", ZielSelect.Value)
iCmd.Parameters.Add("@Description", DescpTxt.Value)
iCmd.Parameters.Add("@Sprache", SelectLanguage.Value)
iCmd.CommandText = "INSERT INTO DatenTb"
iCmd.CommandText += "(Filename,Autor,Thema,Abteilung,Ziel , Description,Sprache)"
iCmd.CommandText += "VALUES(@Filename,@Autor,@Thema,@Abteilung,@Ziel, @Description,@Sprache)"
iCmd.ExecuteNonQuery()
End If
conn.Close()