LSX LC fetch statement error

Hi,

we are migrating the server from R5 to ND6 , but I found we have an error in below code. Fetch statement caused the problem in ND6.

Do you have any idea?? This is the error message.

[Miscrosoft][Driver-Manager] invalid argument value, connect ‘odbc’, method ’ fetch’.

Thank you in advance.

Set fldParm = fldLstParms.Append(“MEMBER_NBR”,LCTYPE_Numeric)

number.value= AccessKey

Call fldParm.SetNumeric(1, number)

fldParm.Flags = LCFIELDF_KEY	



Set fldParm = fldLstParms.Append("USERID",LCTYPE_INT)

fldParm.value= UserId

fldParm.Flags = LCFIELDF_KEY



Call srcCon.Select (fldLstParms, 1, fldLstResult)

While (srcCon.Fetch (fldLstResult) > 0)

	count = count + 1

	EmailAddress = fldLstResult.EMAIL_ADDRESS(0)

Wend

Subject: LSX LC fetch statement error

Hi,

You left out your Dim statements so I can’t see how you defined fldLstResult. If you are only creating one resultset, then…

Dim fldLstResult As New LCFieldList

…would suffice. If you are issuing multiple queries in your code, you can only reuse the same resultset variable if you reset it as New each time:

Set fldLstResult = New LCFieldList

Ken