Page 1 of 1

Sync SQLite data

Posted: Wed May 17, 2017 10:13 pm
by Jeff-Lin
HI,
Is there any way to synchronize SQLite and SQLserver data?

we use X2 Pro or X2 Base.

Re: Sync SQLite data

Posted: Tue Apr 10, 2018 9:24 am
by Russ C.
Hi Jeff-Lin,

Attached is an example project (SQL_Connection.zip) for connecting the panel connect to an external database:

IX, External SQL Connection
IX 2.0 SP1
This example program makes it possible to connect to remote SQL Server.
This script using System.Data.SqlClient Class.
In this example, the answer from the query is put into a text variable.
The example requires general knowledge of SQL Databases.
It is important that the image is version 1.5 (Build 803) or later, when using TXA.

SQL Table:
Image

IX Application:
Image

Re: Sync SQLite data

Posted: Wed Apr 11, 2018 7:36 am
by macphegf
Hi Russ,

Bizarre that you typed this response yesterday and I started looking at this problem today!

I have database code in place for SQLite but I'm struggling to get an MS SQL connection working. I have code that works fine on a T21C and compiles fine on the X2 Pro 10 but when I run it I get the following error:

Can't find PInvoke DLL 'dbnetlib.dll'.

I believe I need the above DLL, presumably in my referenced assemblies list. My problem is I'm not sure where to find the correct version.

Did you have this problem? If not, what hardware are you running this code on?

Thanks,

Greg M.

Re: Sync SQLite data

Posted: Thu Apr 12, 2018 12:52 am
by Greg M
Hi Russ,

I was trying similar code to this yesterday on an X2 Pro 10 but although the code compiles and runs fine on my PC, when downloaded to the terminal I get the following error:

Can't find PInvoke DLL 'dbnetlib.dll'

Did you get this problem on the T7A?

I have tried adding a reference to all the versions of this file I can find on my PC to no avail. I'm worried that even if I can find a compatible file, adding a reference may not solve the problem. I've updated the image to v8.0 Build 569 but still no luck.

Any Ideas?

Re: Sync SQLite data

Posted: Thu May 31, 2018 2:26 am
by mrvop89
Thanks for the information ความงาม