[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source PGDataAdapterTest.cs
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2003-07-27 21:19:41
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source In directory sc8-pr-cvs1:/tmp/cvs-serv17365 Modified Files: PGDataAdapterTest.cs Log Message: Removed non standard constructor from PGParameter and added a new one. Index: PGDataAdapterTest.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGDataAdapterTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PGDataAdapterTest.cs 26 Jul 2003 12:30:31 -0000 1.5 --- PGDataAdapterTest.cs 27 Jul 2003 21:19:39 -0000 1.6 *************** *** 33,37 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, "date_field").Value = DateTime.Now; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 33,37 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, 4, "date_field").Value = DateTime.Now; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 74,78 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, "date_field").Value = DateTime.Now; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 74,78 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@date_field", PGDbType.Date, 4, "date_field").Value = DateTime.Now; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 130,134 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 1; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 130,134 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 1; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 154,158 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 10; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 154,158 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 10; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 178,182 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 40; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 178,182 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 40; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 195,199 **** command = new PGCommand("SELECT int2_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 40; short val = (short)command.ExecuteScalar(); --- 195,199 ---- command = new PGCommand("SELECT int2_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 40; short val = (short)command.ExecuteScalar(); *************** *** 209,213 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 20; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 209,213 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 20; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 226,230 **** command = new PGCommand("SELECT int8_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 20; long val = (long)command.ExecuteScalar(); --- 226,230 ---- command = new PGCommand("SELECT int8_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 20; long val = (long)command.ExecuteScalar(); *************** *** 240,244 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 50; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 240,244 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 50; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 257,261 **** command = new PGCommand("SELECT double_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 50; double val = (double)command.ExecuteScalar(); --- 257,261 ---- command = new PGCommand("SELECT double_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 50; double val = (double)command.ExecuteScalar(); *************** *** 271,275 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 27; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 271,275 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 27; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 288,292 **** command = new PGCommand("SELECT money_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 27; float val = (float)command.ExecuteScalar(); --- 288,292 ---- command = new PGCommand("SELECT money_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 27; float val = (float)command.ExecuteScalar(); *************** *** 302,306 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 60; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 302,306 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 60; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 319,323 **** command = new PGCommand("SELECT numeric_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 60; decimal val = (decimal)command.ExecuteScalar(); --- 319,323 ---- command = new PGCommand("SELECT numeric_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 60; decimal val = (decimal)command.ExecuteScalar(); *************** *** 336,340 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 70; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 336,340 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 70; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 355,359 **** command = new PGCommand("SELECT date_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 70; DateTime val = (DateTime)command.ExecuteScalar(); --- 355,359 ---- command = new PGCommand("SELECT date_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 70; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 371,375 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 80; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 371,375 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 80; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 390,394 **** command = new PGCommand("SELECT time_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 80; DateTime val = (DateTime)command.ExecuteScalar(); --- 390,394 ---- command = new PGCommand("SELECT time_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 80; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 406,410 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 90; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 406,410 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 90; PGCommandBuilder builder = new PGCommandBuilder(adapter); *************** *** 425,429 **** command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 90; DateTime val = (DateTime)command.ExecuteScalar(); --- 425,429 ---- command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int4_field = @int4_field", Connection); ! command.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 90; DateTime val = (DateTime)command.ExecuteScalar(); *************** *** 444,448 **** PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 35; PGCommandBuilder builder = new PGCommandBuilder(adapter); --- 444,448 ---- PGDataAdapter adapter = new PGDataAdapter(command); ! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, 4, "int4_field").Value = 35; PGCommandBuilder builder = new PGCommandBuilder(adapter); |