This commit is contained in:
2009-11-03 16:31:30 +00:00
parent 27cb94f418
commit afc16fb9f9
6 changed files with 102 additions and 48 deletions

View File

@@ -53,14 +53,19 @@ namespace DataLoader
private string GetProc(string setid, string procid)
{
string retval = null;
string xtproccmd = "SELECT * FROM [xtprocid] WHERE [SETID]='" + setid + "' AND [PROCID]='" + procid + "'";
OleDbDataAdapter da = new OleDbDataAdapter(xtproccmd, _DbConnect);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
dt.CaseSensitive = true;
DataRow dr = dt.Rows[0]; // there should be only one entry!
return dr["Procnum"].ToString(); // this should be the procedure number!
using (OleDbDataAdapter da = new OleDbDataAdapter(xtproccmd, _DbConnect))
{
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
dt.CaseSensitive = true;
DataRow dr = dt.Rows[0]; // there should be only one entry!
retval = dr["Procnum"].ToString(); // this should be the procedure number!
ds.Dispose();
}
return retval;
}
private string GetPath(string setid)
@@ -72,7 +77,10 @@ namespace DataLoader
DataTable dt = ds.Tables[0];
dt.CaseSensitive = true;
DataRow dr = dt.Rows[0]; // there should be only one entry!
return dr["Path"].ToString(); // this should be the path to the proc set!
string retval = dr["Path"].ToString();
da.Dispose();
ds.Dispose();
return retval; // dr["Path"].ToString(); // this should be the path to the proc set!
}
private string GetTitle(string setid, string procid)
@@ -84,7 +92,10 @@ namespace DataLoader
DataTable dt = ds.Tables[0];
dt.CaseSensitive = true;
DataRow dr = dt.Rows[0]; // there should be only one entry!
return dr["Proctitle"].ToString(); // this should be the procedure number!
string retval = dr["Proctitle"].ToString();
da.Dispose();
ds.Dispose();
return retval; // dr["Proctitle"].ToString(); // this should be the procedure number!
}
public string GetDescription(string key)