Returning -998 in combit c++

Hi,

i have wired problem with respect to one report it is working in vb but not in c++ as show below:

if the values from database are Null in vb :
If IsNull(lvContent) Then
lvContent = “(NULL)”
End If

if the values from database are Null in c++ :
If ( vContent.vt == VT_NULL )
lvContent = “(NULL)”

The probelm is with this condition it is returning -998

i tried in different ways like :

If( vContent.ToString(.isempty()) )
lvContent = “(NULL)”

if i kept this entire report is not coming. iam not sure what is the problem …i compared with vb and c++ the data everything seems to be ok , but dont know why it is going to endless loop because of that condition :
If ( vContent.vt == VT_NULL )
lvContent = “(NULL)”

please help me out.

Could you post your project file and a debug log file created with Debwin4? That would maybe shed some light on this issue. Have you tried to debug your C++ code? Does the vContent.vt == VT_NULL condition match?

yes the condition matches …it is going perfectly

intoLlDefineFieldExt(strPrefix + strName, varContent.ToString(), nType)

as per vb (it is inserting (_T(“NULL”) ) // with these it is going into endless loop all the project file is ame as vb

Debwin4 ? where i wil lget

It’s somewhere in the installation - just grep for it. There’s also a whitepaper in the KB:

one more thing i tried with

If ( vContent.vt == VT_NULL )
vContent = “(NULL)”

If ( vContent.Tostring().isempty())
lvContent = “TEST”

the report came but test is displaying so if the database values are empty what i have t odo …i if put as “” it is giving issue help me ?

Normally, “(NULL)” should be fine. A log file would help. What are the issues when passing an empty string?

printfields is returning -998 if i keep

If ( vContent.vt == VT_NULL )
vContent = “(NULL)”

but if i add :
If ( vContent.Tostring().isempty())
lvContent = “TEST”

both these lines of code it is displaying as test so some issue with this lines of code?

if the string is empty what to pass in LlDefineFieldExt ?

COMBIT.LOG (2.0 MB)

Sorry, looks like you’ll have to ask the combit support. LL21 is rather old, without a test project this is not easy to debug. Sorry again.

one question for empty values what have to pass to LlDefineFieldExt ?

it worked when writing some space when string is empty …

1 Like