Connecting to MariaDB via OPC

I have a synology diskstation NAS running MariaDB. Further there is a Scada software (Siemens TIA) that needs to write data to this database. This runs on Win7 x64.

I use VB script to write to the database. In the past, we did this to SQL server with success. But now our client wants all data on a NAS.

I installed the ODBC connector v2.0 and V3.0 on the scada pc and created an ODBC connection to the mariaDB, the test button says that all is OK and I can select the database that I need.

But when I run the vb script, I always get the same ODBC error: -2147467259 [Microsoft][ODBC] The name of the data source is not found and no standard program found (translated from dutch error text)

This is my code to connect:

Set conn = CreateObject("ADODB.Connection")

Set rst = CreateObject("ADODB.Recordset")

SQL_String = "Driver={MariaDB ODBC 3.0 Driver};Server=;DSN=VDLDB;Database=VDL;UID=xxx;PWD=xxx;Option=3;Port=3306" conn.Open SQL_String

VDLDB is the name of the ODBC connection VDL is the name of the database on the NAS

Any help on what goes wrong? I used default settings for the ODBC connection


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.