Need help with sqlset()

Discussions specific to Team Developer 5.1.

Need help with sqlset()

Postby kyy8080 » Thu Jul 01, 2010 5:37 am

Hi, all,

i want to set logbackup off/on in my code. But it don't work. I get always sql error 195 - Invalid SET parameter. Please help me.

My sqlset definition:
Function: sqlset
Description: Function sets a database parameter. Return 0 wenn successfull
Export Ordinal: 0
Returns
Number: LONG
Parameters
Sql Handle: HSQLHANDLE
Number: LONG
String: LPSTR
Number: LONG

....
Set l_nValue = 1
Set l_nMaxLength = 256
Call SalStrSetBufferLength( l_sBuffer, l_nMaxLength )
Set l_bOk = CStructPutLong( l_sBuffer, 0, l_nValue )
Set l_nRet = sqlset( a_hSql, 2006, l_sBuffer, 0 ) ! 2006 = SQLPLBM
If l_nRet = 0
Return TRUE
Else
Return FALSE

Thanks
kyy8080
 
Posts: 6
Joined: Mon Apr 26, 2010 6:11 am

Re: Need help with sqlset()

Postby Jeff Luther » Thu Jul 01, 2010 12:10 pm

Try SqlSetParameterAll() and pass 2006 as the constant. See TD Help for details.
Jeff Luther
 

Re: Need help with sqlset()

Postby kyy8080 » Mon Jul 05, 2010 12:11 am

Thank you very much
kyy8080
 
Posts: 6
Joined: Mon Apr 26, 2010 6:11 am


Return to Team Developer 5.1

Who is online

Users browsing this forum: No registered users and 1 guest

cron