extract types to array before switching
This commit is contained in:
		
							parent
							
								
									0cbee068f4
								
							
						
					
					
						commit
						9a99c08f21
					
				
							
								
								
									
										11
									
								
								runner.cs
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								runner.cs
									
									
									
									
									
								
							| @ -23,7 +23,7 @@ namespace test | ||||
|             string nl = Environment.NewLine; | ||||
| 
 | ||||
|             string msg = "Help:"; | ||||
|             msg = msg + nl + "version 0.14"; | ||||
|             msg = msg + nl + "version 0.15"; | ||||
|             msg = msg + nl + "-scs       source connection string"; | ||||
|             msg = msg + nl + "-dcs       destination connection string"; | ||||
|             msg = msg + nl + "-sq        path to source query"; | ||||
| @ -120,9 +120,16 @@ namespace test | ||||
|                 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 ) { | ||||
|                     for (int i = 0; i <= ibmdr.GetValues(getv); i++){ | ||||
|                         dtn[i] = ibmdr.GetDataTypeName(i); | ||||
|                     } | ||||
|                 } | ||||
|                 for ( int i = 0 ; i < ibmdr.GetValues(getv);i++) { | ||||
|                     if (getv[i] != null) { | ||||
|                         switch (ibmdr.GetDataTypeName(i)){ | ||||
|                         switch (dtn[i]){ | ||||
|                             case "VARCHAR": | ||||
|                                 nc = "'" + getv[i].ToString().Replace("'","''") + "'";  | ||||
|                                 break; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user