1. Jose Panatti
  2. Valentina Database ADK
  3. Mittwoch, Mai 03 2017, 08:27 PM
  4.  Abonnieren via E-Mail
I`m trying to use enum types in Xojo from Valentina Database but I can't.
I want to complete a popup menu with strings from an enum type.
Created an object of type VTypeEnum but then I d'ont know how to retrieve the values and complete the popup.
Didn't find information on wiki.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Jose,

lets clarify:
- you using Valentina DB
- you want to use its FIELD TYPE VENUM ?
- you try API or SQL way or may be class_way ?

Did you see Example?
* V4RB/Examples/SQL_way/Field_Enum
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Checking sources of V4RB plugin:

class VEnumType has only Constructor,
and property
Value as String.

I think so far this FIELD must be cerated via SQL ...
And this class allow to use it in VCursor.
Kommentar
There are no comments made yet.
Jose Panatti Akzeptierte Antwort
Hi Ruslan.
I'm trying the API way using Valentina DB (client mode).
I saw the example, But seems to be wrong. It uses method of VDatabase called TypeEnum() that does not exist, I supose.
That occur in Method CreateTable_SQL of the Window.
I keep investigating.
Thanks again.
Kommentar
what is exact name of example and its path?
  1. Ruslan Zasukhin
  2. vor etwa 2 Jahren
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Yes I see that this example not compiles. We will fix this.
It seems the name of method was changed to

* Type(inIndex as integer) As VType
* Type(inName as string) As VType

To FIX that example change line as
enumType = VTypeEnum( mDatabase.Type( "DayOfWeek" ) )


Also you can check TestProject, search TypeEnum to find code related to this feature.
Kommentar
There are no comments made yet.
Jose Panatti Akzeptierte Antwort
Now It works fine. Thanks Ruslan.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Jose,

glad to hear that.

Please notice that main power and unique feature of ENUM fields in ValentinaDB comparing to PostgreSQL, is ability to store SEVERAL sets of localizable strings: EN, DE, RU etc, as many as you need.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories