From 8c8df89cf83c3ea44d3b3b3a0accd9aa956dc479 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 21 Aug 2018 16:21:21 -0400 Subject: [PATCH] move variable scope --- runner.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runner.cs b/runner.cs index 1f3acc2..bbc9d7c 100644 --- a/runner.cs +++ b/runner.cs @@ -23,7 +23,7 @@ namespace test string nl = Environment.NewLine; string msg = "Help:"; - msg = msg + nl + "version 0.15"; + msg = msg + nl + "version 0.16"; msg = msg + nl + "-scs source connection string"; msg = msg + nl + "-dcs destination connection string"; msg = msg + nl + "-sq path to source query"; @@ -114,15 +114,16 @@ namespace test return; } //setup getv object array dimensioned to number of columns for scenario + //getv hold an array of datareader row var getv = new object[ibmdr.FieldCount]; - + //dtn holds list of data types per column + var dtn = new string[ibmdr.FieldCount]; while (ibmdr.Read()) { r = r + 1; t = t +1 ; nr = ""; - var dtn = new string[ibmdr.FieldCount]; //populate all the data type names into a string array instead of calling against ibmdr in every iteration - if (t ==1 ) { + if (t == 1 ) { for (int i = 0; i < ibmdr.GetValues(getv); i++){ dtn[i] = ibmdr.GetDataTypeName(i); }