SqlSetLongBindDatatype function and Long raw column

forum.gupta.bugreport (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SqlSetLongBindDatatype function and Long raw column

Post by NewsgroupServer » 12 Dec 2007, 14:06

 Posted by:  mirceaboeriu 

Hello all,

I am using Team developer 5.1 and I tried with the old code from Team
developer 4.1 to load some data from LONG RAW column (ORACLE database ), but
it doesn't work anymore. I get a null long string.

My code is as following:
!!CB!! 70
Set lstr_MPPlan = ''
Set sSqlString = 'SELECT ' || GetIniItemName( sBin ) ||
' FROM ' || sDatabase || GetIniTblName( sTable ) ||
' WHERE ' || GetIniItemName( 'MEASURINGPROJECTID' ) || ' = :sProjectId '
||
' AND ' || GetIniItemName( 'VERSIONNR' ) || ' = :sVersionNr ' ||
' AND ' || GetIniItemName( 'VERSIONTYPE' ) || ' = :sVersionType ' ||
' INTO :lstr_MPPlan '
! adapt oracle's longbuffer
Call SqlGetParameterAll( hSqlExists, 5112, nLongBufferSize, sDBParam, TRUE )
Call SqlSetParameterAll( hSqlExists, 5112, 2000000, sDBParam, TRUE )
! there is a binary to be loaded:
Call SqlSetLongBindDatatype(1, 23) ! 4=4. BindVar, 23=Binary (22=Text)
Call SqlPrepareAndExecute( hSqlExists, sSqlString )
Call SqlFetchNext( hSqlExists, nExists )
! reset oracle's longbuffer
Call SqlSetParameterAll( hSqlExists, 5112, nLongBufferSize, sDBParam, TRUE )
Call SqlSetLongBindDatatype(1, 22) ! 4=4. BindVar, 23=Binary (22=Text)

where lstr_MPPlan is long string variable.

If anybody has any idea will be very appreciate.

Thank you in advance!

Best regards,
Daniela Cristea

Return to “gupta.bugreport”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests