Returned values from @DbLookup (ODBC)

I want to use SQL to retrieve some values (our order no, our workorder no, intern article no) from our ERP system directly into 3 fields on our form (complaints database)

The customer send me information about their internal ordernumber. I write this number/string into a field and want to click a button to retrieve the information I need.

I have tried the following code as a test for dome of the information I need (no errormsg is created)

@DbLookup( “ODBC” : “NoCache” ; “QSYSDTA” ; “user” ; “password” ; “OOLINE” ; “OBITNO” ; “OBCUOR” ; “[cuord]” ; “” )

The ODBC (named QSYSDTA) is created and works from Visual Basic.

OOLINE = The table with the data I need

OBITNO = Our article number (column in table)

OBCUOR = Customer orderno (column in table)

[cuord] Is the string from the field in the form (customer orderno:)

I run Domino on AS/400 and run Movex (our ERP system) on the same machine.

I’ve read the help file for @DbLookup, @DbColumn and @DbCommand but still I cannot understand how I can display the result from my query.

What am I doing wrong ?

Subject: Returned values from @DbLookup (ODBC)

If I’m reading this correctly (and I may not be; I’m not entirely certain what you’re really asking), the impression I’m getting is that you’ve got the @DBLookup and nothing else lurking behind a button and you want that data to show up somewhere. If that’s the case, it’s a question of puting data somewhere rather than something directly related to @DBLookup. Just set the field you want to hold the data equal to results of the lookup:

FIELD my_field_name := @DBLookup(…and so on)

Subject: RE: Returned values from @DbLookup (ODBC)

Thanks for your answer, but I’ve tried that.

BecoOrd := @DbLookup(…)

where BecoOrd is the fieldname.

nothing happens.!!

Subject: RE: Returned values from @DbLookup (ODBC)

You must use the FIELD keyword in the formula:

FIELD fieldname := value

Subject: RE: Returned values from @DbLookup (ODBC)

Thanks a lot, that solved it.