1. Stan Busk
  2. Valentina Database ADK
  3. Freitag, April 06 2018, 03:05 PM
  4.  Abonnieren via E-Mail
I have two problems:

1.- How do you make all your queries case-insensitive database-wide? The code I used in the past that worked fine with V4RB 4.7 no longer works (at all).

2.- How can you make all your queries ignore accentuated characters database-wide? I mean, how to treat 'å', 'à', 'á' and 'â' as 'a' for example.

Thanks!
Stan
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Stan,

which old code you did have? Please copy paste it.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
This is the old code that no longer works:

Public Sub Database_SetFormats(inDatabase As VDatabase)

Call inDatabase.SqlExecute( "SET PROPERTY WarningMode TO FALSE" )

If TargetMacOS then
inDatabase.LocaleName = "en_US" // http://userguide.icu-project.org/locale | http://php.net/manual/en/class.locale.php (e.g. fr_FR, de_DE, ru_RU )
else
'inDatabase.LocaleName = "en_US_POSIX"
end if

inDatabase.CollationAttribute( EVColAttribute.kStrength ) = EVColAttributeValue.kPrimary // Ignore case and accents when searching and sorting ( OR: SET PROPERTY Strength OF DATABASE TO 'kPrimary')
inDatabase.DateFormat = EVDateFormat.kMDY // MM/DD/YY
inDatabase.DateSep ="/"

End Sub
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Stan,

* your code looks correct.
* we did not make any changes in this area.
* all our tests 100% positive.

So lets learn more deeply.

- why you think it not works? What exactly not works?
- you must be able open your db in Vstudio and see that property of DB are as you assigned them in the above code. You should be able do queries in VStudio and see expected results.

TIP: regular problem of V4RB users - they forget update V4RB plugin to the same version as vcomponents are.
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
You will find attached a very simple Xojo project, you just need to press the 'Perform Queries' button. I guess my queries are correct... The issue seems to come from using LIKE '%text%', I believe the 3 first queries should return the same amount of records and the 2 last queries as well...
Anhänge
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
"The external item 'moValentinaTools' could not be found"
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
Here is the file with the library.
Anhänge
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
It seems I need an existed database (TESTdb.icash) to run the app.
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
The first file I submitted includes the TESTdb.icash database, the second file is just the Xojo project with the missing library.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
You should use "iLIKE" instead of "LIKE" to employ collator settings ("LIKE" is mostly ignore them for speed purpose).
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