[Gambas-bugtracker] Bug #1331: ODBC driver crack status 2: Result object are NULL now.
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Tue Jul 17 03:12:43 CEST 2018
http://gambaswiki.org/bugtracker/edit?object=BUG.1331&from=L21haW4-
Comment #15 by zxMarce:
Benoît, Piccoro,
My original intention to modify the ODBC component was to bring the usefulness of what ODBC drivers call "Connection Strings" to Gambas. This has -IMHO- good advantages over using ODBC.Ini, which is a system file (sudo needed) and not all users would know how to edit, and that goes without mentioning editing the various drivers' own configuration files.
Also, the whole connectivity would reside in a user program config file, and it's more flexible for changing servers and settings as these are in a single textual line and not scattered amongst several ODBC and/or Driver files.
So, I used the already existing .Host property to be either the ODBC.Ini section pointer as it was originally intended, OR to provide a Connection String for the underlying driver if (and only if) the string includes at least one semicolon (";"). These behaviours are mutually exclusive.
In the case of using a Connection String, the only necessary properties to fill in the Connection object are .Type and .Host. No need to fill .Logon nor .Password, as these are already in the Connetion String.
Likewise, if all necessary properties are in ODBC.Ini, the same two properties -and none other- are necessary: As before, property .Type instructs Gambas to use the ODBC component and .Host instructs which section to use from ODBC.Ini. If, on the other hand, any property is not in ODBC.Ini and has a counterpart property in the Connection object, you should specify it.
More information about the Bugtracker
mailing list