Hi,
I am trying to get a result set from stored procedure and insert into a temp table.
While running I am gettting an error
"Cannot execute the required database operation.
The operation failed.
[Microsoft][SQL Server Native Client 10.0][SQL Server]Executing SQL directly; no cursor."
Code
Public void insert_packingSlip()
{
Connection connection;
Statement statement;
str query;
Resultset resultSet;
;
connection = new Connection();
statement = connection.createStatement();
query = "Execute Rpt_Get_Packing_Slip1";
new SqlStatementExecutePermission(query).assert();
resultSet = statement.executeQuery(query);
TmpPackingSlip.clear();
while(resultSet.next())
{
TmpPackingSlip.CUSTACCOUNT = resultSet.getString(1);
TmpPackingSlip.SALESID = resultSet.getString(2);
TmpPackingSlip.STANDARDCONFIGID = resultSet.getString(3);
TmpPackingSlip.PRODUCTTYPECODE = resultSet.getString(4);
TmpPackingSlip.DESCRIPTION = resultSet.getString(5);
TmpPackingSlip.ARTICLE_CODE = resultSet.getString(6);
TmpPackingSlip.PCS = resultSet.getReal(7);
TmpPackingSlip.GROSSWT = resultSet.getReal(8);
TmpPackingSlip.NETWT = resultSet.getReal(9);
TmpPackingSlip.PUREQTY = resultSet.getReal(10);
TmpPackingSlip.STONE = resultSet.getReal(11);
TmpPackingSlip.PURITY = resultSet.getReal(12);
TmpPackingSlip.TOTALVALUE = resultSet.getReal(13);
TmpPackingSlip.MAKINGVALUE = resultSet.getReal(14);
TmpPackingSlip.GOLDANDSTONEVALUE = resultSet.getReal(15);
TmpPackingSlip.insert();
}
CodeAccessPermission::revertAssert();
}
thank you.
*This post is locked for comments