значение Connection.CursorLocation() = 2
AOS - 5.0.1500.4570 64 bit (Windows 2008 R2 64 bit on Hyper-V)
SQL - 10.50.1753 2008 R2 64 bit (Windows 2008 R2 64 bit on Hyper-V)
X++:
boolean test()
{
Com connection2 ;
CCADOConnection connection = new CCADOConnection();
CCADORecordSet rSet;
CCADOCommand commandRs = new CCADOCommand();
str sqlString;
Voucher _voucher;
boolean ret=false;
;
try
{
connection.open(constr);
connection2 = connection.connection();
info(int2str(Connection2.CursorLocation()));// = 2
rSet = new CCADORecordSet();
sqlString = "SELECT TOP 10 LedgerVoucher FROM CUSTINVOICEJOUR";
commandRs.activeConnection(connection);
commandRs.commandText(sqlString);
rSet=commandRs.execute();
While (!RSet.EOF())
{
_voucher=rSet.fields().itemName("LedgerVoucher").value();
info(_voucher);
rSet.moveNext();
}
rSet.close();
connection.close();
connection=null;
ret=true;
}
catch (Exception::Deadlock)
{
retry;
}
catch (Exception::Error)
{
connection.close();
connection=null;
ret=false;
}
return ret;
}