1. Beatrix Willius
  2. Valentina Database ADK
  3. 火, 5月 02 2023, 03:29 PM
  4.  メールで購読
I have a method for a VarCharField:


MethodText = "if (lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'inbox' or lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'sent' or lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'sent messages', "
MethodText = MethodText + "list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "'), list_nthitem(MailboxPath, list_itemcount(MailboxPath, '" + globals.MailboxDivider + "'), '" + globals.MailboxDivider + "'))"

if MailboxTable.CreateVarCharField("MailboxPathName", 1000, EVFlag.fNullable + EVFlag.fIndexed, MethodText) = Nil then
Globals.theErrorLog.LogItem "Error creating MailboxPath Name"
end if


I need to change the method for existing databases. How do I do that?
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello Beatrix,

Using API - using VField.MethodText property

Or SQL:

ALTER TABLE "tblName" MODIFY "MailboxPathName" VARCHAR( 1000 ) METHOD ( ' ... method text ... ' ) INDEXED;
参照
  1. https://valentina-db.com/docs/dokuwiki/v13/doku.php?id=valentina:products:adk:api:vfield_class:vfield_properties#vfieldmethodtext
  2. http://www.valentina-db.com/docs/dokuwiki/v13/doku.php?id=valentina:vcomponents:vsql:reference:alter_table#modify_field
コメント
There are no comments made yet.
Beatrix Willius 承諾済みの回答
Thanks, got it. Was thinking way too complicated as usual.
コメント
There are no comments made yet.
  • ページ :
  • 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. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories