From: <car...@us...> - 2006-03-20 21:52:43
|
Revision: 38 Author: carlosga_fb Date: 2006-03-20 13:52:22 -0800 (Mon, 20 Mar 2006) ViewCVS: http://svn.sourceforge.net/pgsqlclient/?rev=38&view=rev Log Message: ----------- ?\194?\183 Fixed bug in PgDataReader and PgCommandBuilder classes Modified Paths: -------------- trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommandBuilder.cs trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataAdapter.cs trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataReader.cs trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.sln trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.suo Modified: trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs 2006-03-17 18:22:48 UTC (rev 37) +++ trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs 2006-03-20 21:52:22 UTC (rev 38) @@ -108,10 +108,8 @@ { throw new ArgumentException("The property value assigned is less than 0."); } - else - { - throw new NotSupportedException(); - } + + this.commandTimeout = value; } } Modified: trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommandBuilder.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommandBuilder.cs 2006-03-17 18:22:48 UTC (rev 37) +++ trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgCommandBuilder.cs 2006-03-20 21:52:22 UTC (rev 38) @@ -27,6 +27,15 @@ { public sealed class PgCommandBuilder : DbCommandBuilder { + #region \xB7 Static Methods \xB7 + + /// <include file='Doc/en_EN/FbCommandBuilder.xml' path='doc/class[@name="FbCommandBuilder"]/method[@name="DeriveParameters(PgCommand)"]/*'/> + public static void DeriveParameters(PgCommand command) + { + } + + #endregion + #region \xB7 Fields \xB7 private PgRowUpdatingEventHandler rowUpdatingHandler; @@ -60,25 +69,16 @@ #endregion - #region \xB7 Static Methods \xB7 - - /// <include file='Doc/en_EN/FbCommandBuilder.xml' path='doc/class[@name="FbCommandBuilder"]/method[@name="DeriveParameters(PgCommand)"]/*'/> - public static void DeriveParameters(PgCommand command) - { - } - - #endregion - #region \xB7 DbCommandBuilder methods \xB7 public new PgCommand GetInsertCommand() { - return base.GetInsertCommand() as PgCommand; + return base.GetInsertCommand(true) as PgCommand; } public new PgCommand GetUpdateCommand() { - return base.GetUpdateCommand() as PgCommand; + return base.GetUpdateCommand(true) as PgCommand; } public new PgCommand GetUpdateCommand(bool useColumnsForParameterNames) @@ -88,7 +88,7 @@ public new PgCommand GetDeleteCommand() { - return base.GetDeleteCommand() as PgCommand; + return base.GetDeleteCommand(true) as PgCommand; } public new PgCommand GetDeleteCommand(bool useColumnsForParameterNames) Modified: trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataAdapter.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataAdapter.cs 2006-03-17 18:22:48 UTC (rev 37) +++ trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataAdapter.cs 2006-03-20 21:52:22 UTC (rev 38) @@ -29,13 +29,26 @@ [DefaultEvent("RowUpdated")] public sealed class PgDataAdapter : DbDataAdapter, ICloneable { - #region \xB7 Events \xB7 + #region \xB7 Events \xB7 - private static readonly object EventRowUpdated = new object(); - private static readonly object EventRowUpdating = new object(); + private static readonly object EventRowUpdated = new object(); + private static readonly object EventRowUpdating = new object(); - #endregion + public event PgRowUpdatedEventHandler RowUpdated + { + add { Events.AddHandler(EventRowUpdated, value); } + remove { Events.RemoveHandler(EventRowUpdated, value); } + } + [Category("DataCategory_Update")] + public event PgRowUpdatingEventHandler RowUpdating + { + add { Events.AddHandler(EventRowUpdating, value); } + remove { Events.RemoveHandler(EventRowUpdating, value); } + } + + #endregion + #region \xB7 Fields \xB7 private bool disposed; @@ -106,23 +119,6 @@ #endregion - #region \xB7 Methods \xB7 - - public event PgRowUpdatedEventHandler RowUpdated - { - add { Events.AddHandler(EventRowUpdated, value); } - remove { Events.RemoveHandler(EventRowUpdated, value); } - } - - [Category("DataCategory_Update")] - public event PgRowUpdatingEventHandler RowUpdating - { - add { Events.AddHandler(EventRowUpdating, value); } - remove { Events.RemoveHandler(EventRowUpdating, value); } - } - - #endregion - #region \xB7 Protected Methods \xB7 protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) Modified: trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataReader.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataReader.cs 2006-03-17 18:22:48 UTC (rev 37) +++ trunk/pgsqlclient/source/PostgreSql/Data/PostgreSqlClient/PgDataReader.cs 2006-03-20 21:52:22 UTC (rev 38) @@ -251,7 +251,7 @@ if (primaryKeyCmd.Statement.Rows != null && primaryKeyCmd.Statement.Rows.Length > 0) { object[] temp = (object[])primaryKeyCmd.Statement.Rows[0]; - pKeyInfo = (Array)temp[3]; + pKeyInfo = (Array)temp[4]; } // Add row information @@ -280,13 +280,13 @@ schemaRow["BaseCatalogName"] = System.DBNull.Value; if (columnInfo != null) { - schemaRow["IsReadOnly"] = (bool)columnInfo[10]; + schemaRow["BaseSchemaName"] = columnInfo[1].ToString(); + schemaRow["BaseTableName"] = columnInfo[2].ToString(); + schemaRow["BaseColumnName"] = columnInfo[3].ToString(); + schemaRow["IsReadOnly"] = (bool)columnInfo[10]; schemaRow["IsAutoIncrement"] = (bool)columnInfo[10]; schemaRow["IsKey"] = this.IsPrimaryKey(pKeyInfo, (int)columnInfo[6]); schemaRow["AllowDBNull"] = ((bool)columnInfo[9]) ? false : true; - schemaRow["BaseSchemaName"] = columnInfo[0].ToString(); - schemaRow["BaseTableName"] = columnInfo[1].ToString(); - schemaRow["BaseColumnName"] = columnInfo[2].ToString(); } else { Modified: trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.sln =================================================================== --- trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.sln 2006-03-17 18:22:48 UTC (rev 37) +++ trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.sln 2006-03-20 21:52:22 UTC (rev 38) @@ -7,7 +7,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecureSocketLayerTest", "SecureSocketLayerTest\SecureSocketLayerTest.csproj", "{7AFCAB88-9EA7-4263-B339-AB9A05C1C600}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PgSqlClientTest", "PgSqlClientTest\PgSqlClientTest.csproj", "{D7BC6DBA-10C5-4A13-8F15-CEAAF40383F8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{7B05AD5A-05E4-4E41-B6B9-25D5F73D9235}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,10 +27,10 @@ {7AFCAB88-9EA7-4263-B339-AB9A05C1C600}.Debug|Any CPU.Build.0 = Debug|Any CPU {7AFCAB88-9EA7-4263-B339-AB9A05C1C600}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AFCAB88-9EA7-4263-B339-AB9A05C1C600}.Release|Any CPU.Build.0 = Release|Any CPU - {D7BC6DBA-10C5-4A13-8F15-CEAAF40383F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7BC6DBA-10C5-4A13-8F15-CEAAF40383F8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7BC6DBA-10C5-4A13-8F15-CEAAF40383F8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7BC6DBA-10C5-4A13-8F15-CEAAF40383F8}.Release|Any CPU.Build.0 = Release|Any CPU + {7B05AD5A-05E4-4E41-B6B9-25D5F73D9235}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B05AD5A-05E4-4E41-B6B9-25D5F73D9235}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B05AD5A-05E4-4E41-B6B9-25D5F73D9235}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B05AD5A-05E4-4E41-B6B9-25D5F73D9235}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/pgsqlclient/source/PostgreSql.Data.PostgreSqlClient.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |