Hallo Ihr,
ich hab nun schon alles auf dieses Beispiel reduziert, komme aber nicht
drauf, wo es klemmt.
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script Language="c#" runat="server">
void Page_Load(object sender, EventArgs e)
{
OleDbConnection objConnection = null;
OleDbCommand objCmd = null;
string strConnection, strSQL;
strConnection = "Provider=Microsoft.Jet.OleDb.4.0;";
strConnection += @"Data Source=C:\Test\Test1.mdb";
objConnection = new OleDbConnection(strConnection);
objConnection.Open();
strSQL = "INSERT INTO testTab1(Name) VALUES('Karl')";
objCmd = new OleDbCommand(strSQL, objConnection);
objCmd.ExecuteNonQuery();
}
</script>
Server Error in '/Test' Application.
----------------------------------------------------------------------------
----
Operation muss eine aktualisierbare Abfrage verwenden.
Description: An unhandled exception occurred during the execution of the
current web request.
Please review the stack trace for more information about the error and where
it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation muss eine
aktualisierbare Abfrage verwenden.
Source Error:
Line 13: strSQL = "INSERT INTO testTab1(Name) VALUES('Karl')";
Line 14: objCmd = new OleDbCommand(strSQL, objConnection);
Line 15: objCmd.ExecuteNonQuery(); *********************************
rot ************************
Line 16: }
Line 17: </script>
| [aspdedotnet] als [email protected] subscribed
| http://www.dotnetgerman.com/archiv/aspdedotnet/ = Listenarchiv
| Sie k�nnen sich unter folgender URL an- und abmelden:
| http://www.dotnetgerman.com/listen/aspDEdotnet.asp