Getting a table handle from a table name char

Posted by ojfoggin on 03-Jun-2009 09:53

Is it possible to take a char variable and get a handle to the table with the name given in the char?

i.e. with fields I can use...

assign field-handle = buffer customer:handle:BUFFER-FIELD("name").

will give me the handle field-handle to the name field in the current customer record.

Is there something that I can use to get a table in the same way?

I don't even know if I am going the right way with this though.  Just an experiment at the moment.

Thanks!

All Replies

Posted by ojfoggin on 03-Jun-2009 09:57

I may need to explain what I want to do.

Say for example I have a char variable "customer".

I then want to be able to do a find on the customer table by getting a handle to the table from the variable.

Posted by Peter Judge on 03-Jun-2009 10:05

I may need to explain what I want to do.

Say for example I have a char variable "customer".

I then want to be able to do a find on the customer table by getting a handle to the table from the variable.

def var hBuffer as handle.

create buffer hBuffer for table cVar.

hBuffer:find-first(). /* there are others, look at the doc for 'buffer object handle' */

Is that what you're looking for?

-- peter

Posted by ojfoggin on 03-Jun-2009 10:43

That is exaclty what I want to do!

Thanks!

This thread is closed