Source language: Translate to:

Adapting Addressbook sample

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Adapting Addressbook sample

Postby BRobinsonS » Mon Jun 25, 2012 1:32 pm

I am adapting the NeobookDBPro Address book sample for a Legion to help with membership records.

I copied the files over to a new directory.
I removed Company Field and Added Membership Number (MemNo) field in the contacts table.

The information shows correctly in the Grid View.

In the Form View, when trying to assign the MemNo to an edit field using Variables, this varialbe does not show i.e. [[AddrBook.Contacts.memno] to choose it and the Company field still shows.

What don't I understand? What should I be looking for?

Using this to force me to learn NeobookDBPro :oops:
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby Neosoft Support » Mon Jun 25, 2012 2:02 pm

If you've changed the structure of the database by adding or removing fields with dbpCreateTable, then you may need to delete the mdb file so that the new fields can be created.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby BRobinsonS » Mon Jun 25, 2012 3:54 pm

I used Gaev's Program
I wanted to keep the test records.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby Gaev » Mon Jun 25, 2012 7:00 pm

Brian Robinson:
I copied the files over to a new directory.
Can you list all the files you copied ?

I removed Company Field and Added Membership Number (MemNo) field in the contacts table.

I used Gaev's Program
I wanted to keep the test records.
a) Can you provide the exact field name (is it MemNo or memno as stated later in your post) ?

b) What field type, length etc. did you specify ?

c) Did you retain the name of the Table (i.e. Contacts) ?


Take look at the subroutine called DatabaseOpen ... if it does not find the .mdb file, it will ...

a) Create it

b) Create the Contacts Table (using the Company field)

c) load the Table from the csv file

... so make sure the Contacts Table exists (in the same folder as your .pub file) ... and temporarily rename Contacts.csv to Contacts2.csv ... then run your pub again ... if you get an empty Table (Grid), the problem is with the file/table names.

The information shows correctly in the Grid View.
I trust you mean in the Grid View of the sample pub (and not when viewed in AccessDBU).

In the Form View, when trying to assign the MemNo to an edit field using Variables, this varialbe does not show i.e. [[AddrBook.Contacts.memno] to choose it and the Company field still shows.
a) Was that just a typo when posting in the forum ? ... or does the pub also have [[AddrBook.Contacts.memno] as the assigned variable for the MemNo field ? ... don't need two of [[ and memno should be match the field name you specified for your Table

b) I am not sure I understand all that you are trying to say here ... please try and provide images of the Form and the Properties Dialog Box for the MemNo field in the Form


Also, setup temporary Buttons that trigger the following commands ...

dbpGetTableNames
dbpGetFieldNames
dbpGetFieldDefs


... and show the results in an AlertBox ... to verify that your pub is pointing to the Database/Table that you expect it to.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby BRobinsonS » Tue Jun 26, 2012 1:50 pm

After studying and trying your suggestions, I think am ready to answer your questions now.

Generally I have been able to Add MemNo and Remove Company references. It's my misunderstanding of variable with Neobook, NeoBookDBPro. Any mention of some names creates variables.
Also refreshing helped to remove e.g. [Addr.contacts.company] as variable.

Re: Your questions and suggestions
MemNo is a field type String Length 10 for membership number.
Kept the name contacts. After studying DatabaseOpen I understand how it creates the Database and Tables and load from CSV file (but didn't try to load file).

Yes I mean in Grid view of Sample pub (not in AccessDBU).
Typo = yes. (opps).

Used temporay buttons by your suggestion to verify information.

Thank you for being there Gaev and AccessDBU. Will be contacting you.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby Gaev » Tue Jun 26, 2012 3:04 pm

So I trust that you now have the Form and the Grid/View in the sample pub show the new MemNo field ?

BTW, the sample pub's database did not have any data in the Company field ... that might have confused you somewhat.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby BRobinsonS » Tue Jun 26, 2012 3:24 pm

Yes I have that showing.
And I did notice the Company fields were blank.
Thanks again.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests

cron