Posted by: Conrado ZAVALA
I'm currently struggling trying to fix my WebApp. All this time I've been
using Native Routers to handle my database connections but now that I have
several users trying to gatter information I realized that I bypassed a
clear suggestion from Gupta White Paper written by Kumuthini Regavan where
he recommented the use of OLEDB for web applications instead.
I have just wrote a very simple application that populates a child table
based on a query. Here is my PM_Populate code for my table window:
! INITIALIZE variables:
Set SqlUDL = "Provider=SQLBASEOLEDB.1;Password=SYSADM;User ID=SYSADM;Data
Set SqlIsolationLevel = "RL"
Set SqlResultSet = TRUE
Set sSql = "
SELECT DISTINCT LOAD_NO, SHIPSAIL_DT AS SHIPSAIL_DT,
@NULLVALUE( COUNT( CASE_NO ), 0 ) AS TTL_BOXES, @NULLVALUE( SUM( QTY ), 0 )
AS TTL_PIECES, @NULLVALUE( SUM( QTY * SELL_PRICE ), 0 ) AS FOB
FROM LOAD_DETAIL2 WHERE OOM_FLAG = 0 AND RECD_FLAG = 0 AND QTY > 0 GROUP BY
If SqlCreateSession( hSession, SqlUDL )
If SqlCreateStatement( hSession, hSql )
Call SalTblReset( hWndItem )
Call SalTblPopulate( hWndItem, hSql, sSql, TBL_FillAll )
Call SqlCommit( hSql )
Call SqlFreeSession( hSql )
After the program gets to SalTblPopulate( ) call I get the following
Err No: 105 :Attempt to fetch into numeric column that is too small;
Can anyone see any problem in my code, this is the first time I try to use
OLEDB. I will appreciate your answer.