update how connection string are set
This commit is contained in:
parent
651807b401
commit
0cfdfce746
10
runner.cs
10
runner.cs
@ -21,11 +21,11 @@ namespace test
|
|||||||
string nr = "";
|
string nr = "";
|
||||||
string nc = "";
|
string nc = "";
|
||||||
string nl = Environment.NewLine;
|
string nl = Environment.NewLine;
|
||||||
var ibmc;
|
System.Data.Odbc.OdbcConnection ibmc = new System.Data.Odbc.OdbcConnection();
|
||||||
var pgc;
|
NpgsqlConnection pgc = new NpgsqlConnection();
|
||||||
|
|
||||||
string msg = "Help:";
|
string msg = "Help:";
|
||||||
msg = msg + nl + "version 0.23";
|
msg = msg + nl + "version 0.24";
|
||||||
msg = msg + nl + "-scs source connection string";
|
msg = msg + nl + "-scs source connection string";
|
||||||
msg = msg + nl + "-dcs destination connection string";
|
msg = msg + nl + "-dcs destination connection string";
|
||||||
msg = msg + nl + "-sq path to source query";
|
msg = msg + nl + "-sq path to source query";
|
||||||
@ -98,13 +98,13 @@ namespace test
|
|||||||
//-------------------------------------------establish connections-------------------------------------------------
|
//-------------------------------------------establish connections-------------------------------------------------
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ibmc = new System.Data.Odbc.OdbcConnection(scs);
|
ibmc.ConnectionString = scs;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Console.Write(nl + "bad source connection string: " + e.Message);
|
Console.Write(nl + "bad source connection string: " + e.Message);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
pgc = new NpgsqlConnection(dcs);
|
pgc.ConnectionString = dcs;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
Console.Write(nl + "bad source connection string: " + e.Message);
|
Console.Write(nl + "bad source connection string: " + e.Message);
|
||||||
|
Loading…
Reference in New Issue
Block a user