NetTalk Central

Author Topic: p_web.FileToSessionQueue seems not to be working  (Read 4238 times)

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
p_web.FileToSessionQueue seems not to be working
« on: October 03, 2014, 08:31:13 AM »
Hi,

I'm trying to read data from a form to a secondary file. It seems that is reading the second file but
when displaying data from the second file, it is just blank. Using NTWS 7.26.

Here is the code I'm using:

 DO OPENFILES
 INS1:NumSoc= PEN:NumSoc
 Get(INFSOCW,INS1:KeyNumSoc)
    message(PEN:NumSoc)                        !Correct number is displayed

 p_web._LoadRecord(Infsocw,INS1:KeyNumSoc)
   message(INS1:Dir1)                               ! Data is displayed
 p_web.FileToSessionQueue(INFSOCW)
 p_web.SSV('dir1',INS1:Dir1)
    message(p_web.GSV('Dir1'))                  !   Blanks are displayed
 
 DO CLOSEFILES

Thanks for any help.
                   
 

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: p_web.FileToSessionQueue seems not to be working
« Reply #1 on: October 04, 2014, 09:04:13 AM »
try this:
p_web.SSV('dir1',p_web.GSV('INS1:Dir1'))
p_web._trace( p_web.GSV('Dir1') )

Robert

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: p_web.FileToSessionQueue seems not to be working
« Reply #2 on: October 05, 2014, 09:55:47 AM »
Hi Robert,

Maybe I'm using the wrong embed, as it does not seem to work even tough I can read the record.

 :-[

Maybe is a bug in version 7.6.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: p_web.FileToSessionQueue seems not to be working
« Reply #3 on: October 05, 2014, 10:34:55 PM »
Hi Hector,

Let's reduce the code a bit to just load the record, and store it in the session queue...

Is the prefix of INFSOCW really INS1 ?

Access:INFSOCW.Open()
Access:INFSOCW.UseFile()
INS1:NumSoc= PEN:NumSoc
Access:INFSOCW.Fetch(INS1:KeyNumSoc)
p_web.FileToSessionQueue(INFSOCW)
Access:INFSOCW.Close()


This code will run anywhere, but of course pre-supposes that PEN:NumSoc is set to something.

Cheers
Bruce

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: p_web.FileToSessionQueue seems not to be working
« Reply #4 on: October 06, 2014, 01:36:25 PM »
Hi Bruce,

Thanks for help.

It works as a charm!