1. Stan Busk
  2. Valentina Database ADK
  3. Friday, April 06 2018, 03:05 PM
  4.  Subscribe via email
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
Comment
There are no comments made yet.
Ruslan Zasukhin Accepted Answer
Hi Stan,

which old code you did have? Please copy paste it.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Stan Busk Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ruslan Zasukhin Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Stan Busk Accepted Answer
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...
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Ivan Smahin Accepted Answer
"The external item 'moValentinaTools' could not be found"
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Stan Busk Accepted Answer
Here is the file with the library.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
Ivan Smahin Accepted Answer
It seems I need an existed database (TESTdb.icash) to run the app.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
Stan Busk Accepted Answer
The first file I submitted includes the TESTdb.icash database, the second file is just the Xojo project with the missing library.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 9
Ivan Smahin Accepted Answer
You should use "iLIKE" instead of "LIKE" to employ collator settings ("LIKE" is mostly ignore them for speed purpose).
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 10
  • Page :
  • 1


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