[DesignerAttribute ("Microsoft.VSDesigner.Data.VS.OdbcCommandDesigner, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.ComponentModel.Design.IDesigner")]
[ToolboxItemAttribute ("System.Drawing.Design.ToolboxItem, "+ Consts.AssemblySystem_Drawing)]
#if NET_2_0
+ [DefaultEvent ("RecordsAffected")]
public sealed class OdbcCommand : DbCommand, ICloneable
#else
public sealed class OdbcCommand : Component, ICloneable, IDbCommand
}
[OdbcDescriptionAttribute ("Time to wait for command to execute")]
+#if NET_1_0 || ONLY_1_1
[DefaultValue (30)]
+#endif
public
#if NET_2_0
override
#endif // ONLY_1_1
#if NET_2_0
+ [DefaultValue (null)]
+ [EditorAttribute ("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public new OdbcConnection Connection
{
get { return DbConnection as OdbcConnection; }
[BrowsableAttribute (false)]
[DesignOnlyAttribute (true)]
[DefaultValue (true)]
+#if NET_2_0
+ [EditorBrowsable (EditorBrowsableState.Never)]
+#endif
public
#if NET_2_0
override
override
#endif
UpdateRowSource UpdatedRowSource {
- [MonoTODO]
get {
return updateRowSource;
}
- [MonoTODO]
set {
updateRowSource = value;
}
ReAllocStatment ();
- ret=libodbc.SQLExecDirect(hstmt, sql, sql.Length);
- if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
+ ret = libodbc.SQLExecDirect (hstmt, sql, libodbc.SQL_NTS);
+ if ((ret != OdbcReturn.Success) && (ret != OdbcReturn.SuccessWithInfo) &&
+ (ret != OdbcReturn.NoData))
throw new OdbcException(new OdbcError("SQLExecDirect",OdbcHandleType.Stmt,hstmt));
return;
}
{
int records = 0;
if (Connection == null)
- throw new InvalidOperationException ();
+ throw new InvalidOperationException ("No open connection");
if (Connection.State == ConnectionState.Closed)
- throw new InvalidOperationException ();
+ throw new InvalidOperationException ("Connection state is closed");
// FIXME: a third check is mentioned in .NET docs
ExecSQL(CommandText);