03-23-2022 12:37 PM - edited 03-23-2022 12:38 PM
wiebe@CARYA wrote:
You need to be especially careful with ODBC and passwords, as the passwords are stored as plain text in the registry.
That is not necessary! You can for most drivers simply leave the username and password empty in the ODBC Administrator setup (or not mention the UID and PWD keywords in the connection string) and supply the parameters to the DB Tools Open Connec (String/Path).vi from your application through the specific parameters.
And for the "ODBC Driver 17 for SQL Server" you can even add a parameter to the connection string "Authentication=ActiveDirectoryIntegrated" and then it will attempt to use a SSO configuration for your server if that was setup correctly in Active Directory for the SQL Server configuration, even if the server is running in the Azure cloud.
03-23-2022 12:47 PM
I have indeed used those same connection strings, inputting my pertinent information of course. And received the error "Operation cannot be executed because an error occurred during connection to the driver".
I am feeling fairly defeated at this point with the MySQL situation.
Are there other free databases and database managers that work similar to MySQL that folks would recommend?
Or does any have other suggestions to try?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-23-2022 01:11 PM
But what library are you using? NIs database connectivity toolkit? There are others...
The choice for a database depends on the needs.
Does it need to be centralized (SQLServer)? Or file based (Access, SQLite, even a .txt file can be accessed through SQL).
03-23-2022 01:19 PM
@rolfk wrote:
wiebe@CARYA wrote:
You need to be especially careful with ODBC and passwords, as the passwords are stored as plain text in the registry.
That is not necessary! You can for most drivers simply leave the username and password empty in the ODBC Administrator setup (or not mention the UID and PWD keywords in the connection string) and supply the parameters to the DB Tools Open Connec (String/Path).vi from your application through the specific parameters.
Could have been clearer: careful if you set a password in ODBC, because it will be stored in the registry.
03-23-2022 01:24 PM
It is for a project creating a working inventory management system. There will be centralized computer on premise as the server and it will accessible via any computers on the network. And yes, I am presently using the Data Connectivity Toolkit.
Thank You
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-23-2022 03:52 PM
We gave up on the DB Toolkit a while back and use this for communicating with MySQL.
03-23-2022 04:28 PM
This is where I am at currently.
I was able to use a 32 bit data source with the MySQL ODBC 5.3 ANSI Driver. I created the source and had a successful connection using the local host. Using the DB toolkit and a proper connection string I was able to connect and list my databases tables as a test without issue.
Fast-forward...Now trying for remote connectivity via client computer. Exact same code as previously used on host computer. Except I adjusted the string to reflect the host computers IP instead of the default localhost. Now it says the data source does not work and there is no specified driver.
<see attached photos>
Capture is the failed attempt at remote access
Capture 2 is the successful connection to the server and database on the host computer.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-24-2022 04:28 AM
First thing I'd do is to (try to) ping the machine.
Next, temporarily disable the firewall.
Maybe the driver bitness (32\64) and the server machine bitness need to match? Do they match?
Can you validate the connection with some other (MySQL) tool. I'm no expert, but at a glance there seems to be command line tools for MySQL. The mysql Command-Line Tool - Techotopia
03-24-2022 09:26 AM - edited 03-24-2022 09:27 AM
I have pinged the machine from every computer in the office and had no issues. I adjusted everything to ensure there was no architecture mismatches across the whole of the network. Double checked bitness across LV, drivers, MySQL, etc. The firewall has been disabled for the last 3 days. Still to no avail. I honestly don't know what to do with it. I have never seen such an issue persist. It is more than likely some exceedingly simple adjustment that needs to be made, but for whatever reason myself nor the other programmer in the office seem to be able to find the issue.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-24-2022 09:48 AM
Have you made a try with the development computer to dial to a server and not to a localhost ? You can face issues with the port maybe.
Localhost is cool to try a function but ,in my opinion, it will never confirm that a process is fully working as it can bypass things.