Source language: Translate to:

once more database

Questions about NeoBook PlugIns

Moderator: Neosoft Support

once more database

Postby henni » Tue Jan 23, 2007 12:31 am

I want to have a combobox fill in a special field of one record. The command
If "[ComboBox1]" "=" "1"
SetVar "[video.Kategorie]" "[ComboBox1]"
EndIf
If "[ComboBox1]" "=" "2"
SetVar "[video.Kategorie]" "[ComboBox1]"
EndIf
work, but there is no change of the field contents when switching to the next record, the contents remain the same.
Any suggestions?
henni
 
Posts: 13
Joined: Tue Mar 14, 2006 9:33 am

Postby Gaev » Tue Jan 23, 2007 5:15 am

henni:
but there is no change of the field contents when switching to the next record,

It is difficult to envisage the relationship between the "change to the next record" and "your code" ... i.e. how/when is the code triggered ? ... is it actually triggered ? etc. ... so replace the code above with ...
Code: Select all
If "[ComboBox1]" "=" "1"
   SetVar "[video.Kategorie]" "[ComboBox1]"
   AlertBox "Is 1" "video.Kategorie=[video.Kategorie]|ComboBox1=[ComboBox1]"
EndIf
If "[ComboBox1]" "=" "2"
   SetVar "[video.Kategorie]" "[ComboBox1]"
   AlertBox "Is 2" "video.Kategorie=[video.Kategorie]|ComboBox1=[ComboBox1]"
EndIf

If any of this code is triggered, you will get an AlertBox popup with values (in the title and message) that will give you a clue ...

- if the popups don't happen, then the code is not being triggered

- if they happen, check the values against those expected

- if they happen and show the expected values ... as per my suggestion in a previous problem/post ... check that your database was dbfOpen'ed ... and that the Kategorie field is of the type to accept the value in [ComboBox1]


P.S. Did you resolve your problem as stated here ... http://www.neosoftware.com/forum/viewto ... =#11182001 ... and if so, what was the nature of it ? ... might give a clue to what is wrong in this case ... as they show similar symptoms.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

DBF change record problem

Postby henni » Thu Jan 25, 2007 1:21 am

First of all Thank you for your help. But in contrary to the first item I posted (which is working now, DBF open!!!) in this case the item of the combobox is triggered, but again, despite of opened DBF file (all other fieds are working properly) the next record contains the same string although it should be empty before doing the next choice.
henni
henni
 
Posts: 13
Joined: Tue Mar 14, 2006 9:33 am

DBF change record problem 2

Postby henni » Thu Jan 25, 2007 1:46 am

This is what I have to add:
The problem seems to be that after having created a new database it is difficult to change fields afterwards and let them appear as database fields in the same page of the publication.
Those new fields seem constantly not to be accepted or taken as new database fields but only as simple input fields. So this is the reason that content changes do not affect the database as such.
This is an old neobook problem which I was noticing long ago. It has not been fixed in the meantime - or did I miss something?

henni
henni
 
Posts: 13
Joined: Tue Mar 14, 2006 9:33 am

Postby Gaev » Thu Jan 25, 2007 5:41 am

henni:
The problem seems to be that after having created a new database it is difficult to change fields afterwards and let them appear as database fields in the same page of the publication.
Those new fields seem constantly not to be accepted or taken as new database fields but only as simple input fields. So this is the reason that content changes do not affect the database as such.
This is an old neobook problem which I was noticing long ago. It has not been fixed in the meantime
It is not a problem ... as in "a defect/bug that can be fixed" ... NeoBookDB deploys the dBase file format to store database content in the .dbf files ... this is a very old (circa 1984) standard ... and it does not facilitate dynamic structural (as in new fields) changes ... what you specify during dbfCreate is what you are stuck with afterwards ... the only way to add, change or delete fields is to create a new database with the desired field structure ... and write a script to loop through records in the old database ... copying the contents of each field from the old to the new database.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron