Opening a record Ref Variable

Hi all, I am unable to open a record ref variable using RecordRef.Open(table,temp,companyname);[:(!] company := ‘SERVICE’; RecordRef.OPEN(18,TRUE,company); Service is not the currnet company when I am running this code. This company also exists in my database. Error will also change everytime I run this 2 line code --------------------------- Microsoft Business Solutions-Navision --------------------------- TableData 2000100018 does not exist. --------------------------- OK --------------------------- Any Help will be really appriciable.[8D] Regards Param

What is the reason behind opening a temporary table in a different company ? Do you really want to open the recordref as a temporary variable ? What is the purpose of that ?

quote:

What is the reason behind opening a temporary table in a different company ? Do you really want to open the recordref as a temporary variable ? What is the purpose of that ?
Originally posted by tb@softsys.at - 2005 Aug 19 : 07:33:31

I need to Copy the Table Data from one company to another company. This Table data transfer is for some table like…State,Country,Item etc. for that I need One function which passing table no as parameter and that function should transfer the data from one company to another company.[8D]

In this case it is necessary to open the table in the NON-Temporary mode: RecRef1.OPEN(TableNo,FALSE,COMPANY1); RecRef2.OPEN(TableNo,FALSE,COMPANY2); if now the company1 and company2 varaibales contain valid company names, you should be able to transfer data between the two companies.

Hi Thomas, I think I won’t be able to write to database using temporary mode of record ref object. What do you say?? Thanks Param

You can only make a recordref temporary in the current company, so leave the companyparameter empty. If you want to read from another company you cannot use a temporary recordref A temporary table or recordref only exists on the client where it is started. Regards, Mark

hi

i need to write Table data in to TEXT file when ever the record Inserted in table .

right now i am able to write in text file .

but my problem is can i store the complet record in a variable…