Logic to handle when a RO Database is selected when generating report information
In creating a temporary (meta) file for Complete RO Report, file was sometimes not created anew with the FileMode.Create setting. Changed to FileMode.Append and specifically delete the meta file before calling to generate it.
This commit is contained in:
parent
9c62cc93eb
commit
b9c6d317c7
@ -1631,11 +1631,14 @@ namespace RODBInterface
|
|||||||
public VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
public VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
||||||
{
|
{
|
||||||
VlnXmlElement retele = null;
|
VlnXmlElement retele = null;
|
||||||
string readstr = "SELECT ParentID, AccPageID, Info FROM " + tbl + " WHERE RecID = '" + recid + "'";
|
string readstr = "SELECT ParentID, AccPageID, Info FROM " + tbl + " WHERE "+ ((recid==null)? "ParentID = '00000000'" : ("RecID = '" + recid + "'"));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DBE.Command(readstr);
|
DBE.Command(readstr);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|
||||||
|
if (recid == null)
|
||||||
|
DBE.Read(); // skip the first parentID record of 00000000
|
||||||
|
|
||||||
if (DBE.Read())
|
if (DBE.Read())
|
||||||
{
|
{
|
||||||
|
@ -123,12 +123,14 @@ namespace RODBInterface
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Rptfs = new FileStream("print.tmp", FileMode.Create);
|
//Rptfs = new FileStream("print.tmp", FileMode.Create);
|
||||||
|
Rptfs = new FileStream("print.tmp", FileMode.Append);
|
||||||
// Create the writer for data.
|
// Create the writer for data.
|
||||||
RptBW = new BinaryWriter(Rptfs);
|
RptBW = new BinaryWriter(Rptfs);
|
||||||
}
|
}
|
||||||
catch (Exception )
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Open Print.Tmp: {0}", ex.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user