I’m only asking about this because it’s not really well covered in the language reference.
can I access MySQL databases with real basic - the database is whatever wordpress uses (we are going to create some extra tables and store data in our wordpress database) without using a plugin. I had professional and now using Xolo.
how can I do this so I don’t need to change the code for MAC and Windows?
What the guide user forgets to mention is that the plugin produces a string without encoding (unlike, for example, that for SqlLite)
The string in xojo are in UTF-8, so there may be problems if you do not force the encoding by reading the results of the plugin.
Apparently there is no solution to this perennial problem. And this despite mysql is now installed with the UTF-8 encoding enabled.
[quote=12329:@Antonio Rinaldi]What the guide user forgets to mention is that the plugin produces a string without encoding (unlike, for example, that for SqlLite)
The string in xojo are in UTF-8, so there may be problems if you do not force the encoding by reading the results of the plugin.
Apparently there is no solution to this perennial problem. And this despite mysql is now installed with the UTF-8 encoding enabled.[/quote]
Not really forgotten since I didn’t realize this was an issue.
For now, I’ve updated the MySQLCommunityServer page in the Language Reference with this information about encodings.
The MySQL plugin that we ship with Xojo is open-source. In fact, the complete source is included with Xojo (in Database Plugin Resources/MySQL/source). If any enterprising folks see an obvious way this can be addressed, please create a Feedback case with your suggestions.
[quote=12333:@Paul Lefebvre]Not really forgotten since I didn’t realize this was an issue.
For now, I’ve updated the MySQLCommunityServer page in the Language Reference with this information about encodings.
The MySQL plugin that we ship with Xojo is open-source. In fact, the complete source is included with Xojo (in Database Plugin Resources/MySQL/source). If any enterprising folks see an obvious way this can be addressed, please create a Feedback case with your suggestions.[/quote]
Is an issue al long concatenating an UTF string (default in xojo) with a nil encoded string gives you a nil encoded string. And if you write non ascii chars you will note the issue.
I took a quick look at the source of the plugin and I’ve seen that is not made any “forcing” to the encoding from which the nil encoding.
But I also saw that for the memory cursor is done so in any way you can.
[quote=12257:@Antonio Rinaldi]dim db as new MySQLCommunityServer
db.Host=“yourHostAddress”
db.UserName=“yourUserName”
db.Password=“yourPassword”
db.DatabaseName=“yourDatabaseName”
Then remember to set up the connection with UTF-8
if db.Connect then db.SQLExecute “SET NAMES ‘utf8’”
And when retrieving strings to define them to UTF-8 : dim myString as string=rs.field(“myField”).stringValue.defineEconding(encodings.utf8)
Since Xojo loose the string encoding definition[/quote]