Passing handle value as a string between programs

abaliga

New Member
Hello Progress Gurus,

I have a strange situation where in I need to pass handle values as strings between two programs. I cannot pass the handle to the second program as an input parameter.

My handle is a query handle for a query defined in program A, and I am passing this as a string to program B using a global value-pair thing we have where in we can pass value pairs (variable name, value) to the second program. We cannot do input output parameters because of our old menuing system which supports runs, but not runs with inputs.. its kind of weird, but please take my word for it. ;-)

So I have this string value(integer) for the query handle I pass, in Program B.
Now I define a handle in program B and then assign the handle to the string value of the handle from Program A, using the widget-handle function.

I can message out stuff about the name, which correctly gives me the query name, the query prepare string etc, But then if I try to scroll the query directly for our Next, Previous Buttons things, I don't seem to scroll the query. It is stuck.

But if I have code below, then I can scroll the query, not really, but I can get to the record I want to.

/**
hdl = hlQuery:get-buffer-handle(1).
**/
I can get the buffer handle and then find the record and reposition the query back, hlQuery:reposition-to-row seems to work fine.


but hlQuery:get-next() or hlQuery:get-prev don't seem to work.

Any inputs with this issue appreciated.

thanks!
 

gcampbell

Member
Should work okay. I've attached two test programs to illustrate how it would work. You need to connect to the Sport2000 db to test.

later,
Gordon
 

Attachments

  • testq1.p
    279 bytes · Views: 39
  • testq2.p
    570 bytes · Views: 38

abaliga

New Member
Thank you, I was missing the set of the buffer handle in the second program. I didn't realize that fact. It works like a charm now.

Thanks again.
 
Top