NetTalk Central

Author Topic: Browse on a queue  (Read 3170 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Browse on a queue
« on: November 09, 2016, 04:35:28 AM »
Hi,

I saw a previous post asking for advice how to create a browse on a queue. The responses pointed to using a memory table and not a queue.

I have a similar request, but my queue is created from rows that SQL stored procs returns. So I can't put it in a memory table as there is no physical underlying table for it. The only way that I think it will work, is to create a temp table to populate the results into and then load it in the browse via a dct table. Because it's multi-user I'll have to be careful to have distinct temp table names. So I'll also have to give the dct table a variable name depending on the user. Seems complex for a simple task?

Is there any alternative to this available?

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Browse on a queue
« Reply #1 on: November 13, 2016, 10:10:33 PM »
Hi Thys,

>> I saw a previous post asking for advice how to create a browse on a queue. The responses pointed to using a memory table and not a queue.

Correct, global queues are not thread-safe, and local queues don't exist for long enough to be useful.

>> I have a similar request, but my queue is created from rows that SQL stored procs returns.

Template work on fixed structures, not variable structures. So if you are creating variable structures at runtime, and you want to use a template, then you need to move that data into a known fixed structure.

>> The only way that I think it will work, is to create a temp table to populate the results into and then load it in the browse via a dct table.

Correct, that's the easiest way.

>> Because it's multi-user I'll have to be careful to have distinct temp table names.

It's a lot simpler to add a SessionID field to the memory table, and then just filter on that for the browse.

Cheers
Bruce