Hallo,

Hab mir gestern eine funktion dafuer geschrieben :)


public void InsertOleDbDataSet( string oledb_insert, string ConString)
                {
                        OleDbConnection datacon = new OleDbConnection(ConString);
                        OleDbCommand command = new OleDbCommand();
                        
                        datacon.Open();
                        command.Connection = datacon;
                        command.CommandText = (oledb_insert);
                        try
                        {
                                command.ExecuteNonQuery();
                        }
                        catch(Exception ex)
                        {
                                throw ex;
                        }
                        finally
                        {
                                datacon.Close();
                                command.Dispose();
                        }

                }

Hoffe es hilft dir weiter :)
Cheers daniel

> -----Original Message-----
> From: Alexander Zeitler [mailto:[EMAIL PROTECTED] 
> Sent: 08 October 2003 10:35
> To: [EMAIL PROTECTED]
> Subject: Re: [Asp.net] ASP.NET und Access
> 
> 
> 
> Hallo,
> 
> >
> >Ich m�chte / muss eine Access-DB f�r eine WEB-Anwendung 
> nutzen. Von der 
> >Performance her ist das kein Problem aber ich bekomme eine 
> kein Insert 
> >hin?!
> >
> >Diese FM bekomme ich:
> >Operation must use an updateable query.
> >
> >Und hier der Code: 
> this.oleDbInsertCommand1.Parameters["name"].Value = 
> >this.name.Value; 
> >this.oleDbInsertCommand1.Parameters["eMailAddress"].Value = 
> >this.emailaddress.Value; 
> >this.oleDbInsertCommand1.Parameters["notes"].Value = 
> this.notes.Value; 
> >this.oleDbInsertCommand1.Connection.Open();
> >this.oleDbInsertCommand1.ExecuteScalar();
> >
> >Jemand ne Idee?
> >
> habe das noch nie gemacht, aber woher wei� er, wie die
> Tabelle hei�t, die er updaten sollten?
> 
> Gruss
> 
> Alex
> 
> _______________________________________________
> Asp.net mailing list
> [EMAIL PROTECTED] 
> http://www.glengamoi.com/mailman/listinfo/asp.net
> 
_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an