View Single Post
  #4 (permalink)  
Old April 26th, 2009, 05:10 AM
Willemt Willemt is offline
Registered User
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Thanks Greg,

It seems that for some other reason the cmd.CommandText produces an empty string. I have recoded it and now the update is perfectly done.

Code:
   try
    OracleConn := new OracleConnection;
    cmd := new OracleCommand;
    OracleConn.Connectionstring := 'User Id=SCHULDHULP;Password=pass; Data Source=Omgeving;'; 
    OracleConn.Open;
    cmd.Connection := OracleConn;
         cmd.CommandText := "UPDATE AANVRAGER SET GESLACHT = 'Vrouw' WHERE BSN = 9675463772";
         cmd.ExecuteNonQuery();
    end;
    finally
        OracleConn.Close();
        OracleConn.Dispose();
    end;