Hi. I want to use mySQL from LabView and I don't (and won't) have the Database Connectivity Toolset, so I decided to communicate with it through ADO, using the respective myOLEDB driver. I have succeded in executing simple SQL text queries and even reading data from tables, but I'm still not able to insert data them. I know about two ways:
1. Create command to retrieve an empty (or not) recordset, use the "addnew" method and update. This gives me an error. I have read about an addnew method error (or bug) on LV 6 and a supposed workaround, it is supposedly also solved on LV7.1, but the bug (or error) is not solved and the workaround doesn't work. I think the problem is that the "values" parameter of the addnew method requires a SAFEARRAY input. I also have read about passing SAFEARRAYs to activex components, but I have only found repetitive answers which are not enough clear for me. I'm not a C++ expert.
2. Create a parameterized query command, create and append parameters, assign parameter values and update. This doesn't work too. I followed a VB example and "translated" it into LabView, but no success. I attach some part of the code.
If anyone has worked with ADO and/or mySql and has a sample VI, or has a sample VI to build SAFEARRAYs or has some workaround or suggestion, your contribution will be greatly appreciated.
(Three days working on this)
Regards,
Daniel R.
UdeC - Chile
Daniel Ramírez
MSc - Mechanical Engineer
Universidad de Concepción