Source language: Translate to:

Variable to call a picture filed

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Variable to call a picture filed

Postby Daved » Thu Feb 27, 2014 10:49 am

I have an application that uses dynamic table names.
Everything seems to work with a variable inserted in the field and table calls.
I am trying to view and update a picture field.
[all_in_one.house_table.pic_1] works fine.
Var [cat_name] ="house_table"

[all_in_one.[cat_name].pic_1] fails on display or change of the picture field.

The record is the selected record in a grid.
Thanks in advance
Posts: 19
Joined: Mon Nov 11, 2013 3:37 pm

Re: Variable to call a picture filed

Postby Gaev » Thu Feb 27, 2014 11:11 am


When you dbpOpenTable, specify a subroutine (e.g. myTableOpen).

Then, code this for the subroutine ...
Code: Select all
SetVar "[currentPicField]" "[all_in_one.[cat_name].pic_1]"
... and specify [currentPicField] as the variable associated with your Picture object

From the Help file ...
dbpOpenTable "database id" "table" "subroutine"

The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. This can be useful if you want to activity to take place whenever the reader displays a different record. Subroutines are entered from the Actions page of NeoBook's Book Properties screen. NeoBook's help file contains more information on using subroutines.
... so your subroutine will be invoked every time there is a change in the "current record" ... the SetVar will update your variable with the most current values.
User avatar
Posts: 3748
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests