LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sync. from two SQL Compact Edition 4.0 database

Hi,

Is it possible, to synchronize two SQL CE 4.0 with LabVIEW?

The situation is, that on two notebook is a database with same tables just filled with diffrent data. SQL Compact Edition 4.0 

 

Is it possible to get both databases in one with labview ?

 

 

0 Kudos
Message 1 of 14
(4,305 Views)

Hello Fabian210298,

 

i do not know a direct syn method or function for doing this. You can use two seperate connection one to each database and then made your own sync tool with reading and comparing the values inside of the tables. And yes it should be possible to make a Connection to two databases in parallel.

best regards
Alexander
0 Kudos
Message 2 of 14
(4,253 Views)

Thank you for your answer!

Are there perheps examples to connect SQL Compact 4.0 DB. I don't know how to connect them, because no provider fit to the datalink. 

It's difficult to use this special type of DB, but that typ is set. 

best regards

Konrath Fabian

 

0 Kudos
Message 3 of 14
(4,228 Views)

Hello Fabian210298,

the Microsoft SQL Server OLE DB driver should work the connection string can looks like:

Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=myDir\myDataBase.sdf; 

here are some additional informations about the connection strings

Inserting data to a . SDF database (SQL Server Compact Edition Connection)

best regards
Alexander
Message 4 of 14
(4,224 Views)

Hello Alexander Glasner,

fhanks for information!

I tried to open the Database, but i got an error when LV try to connect to the DB. 


Error -2147467259 occurred at NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi

Possible reason(s):
ADO Error: 0x80004005
Exception occured in Microsoft SQL Server Compact OLE DB Provider: in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi


This error happen in the DB Tool open Connection.vi 

In the picture you can see how i tried it. Maybe you have an advise or know my mistake.

 

 

 

0 Kudos
Message 5 of 14
(4,215 Views)

Hello Alexander Glasner,

fhanks for information!

I tried to open the Database, but i got an error when LV try to connect to the DB. 


Error -2147467259 occurred at NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi

Possible reason(s):
ADO Error: 0x80004005
Exception occured in Microsoft SQL Server Compact OLE DB Provider: in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi


This error happen in the DB Tool open Connection.vi 

In the picture you can see how i tried it. Maybe you have an advise or know my mistake.

 

 

 

Download All
0 Kudos
Message 6 of 14
(4,215 Views)

Hello Alexander Glasner,

thanks for information!

I tried to open the Database, but i got an error when LV try to connect to the DB. 


Error -2147467259 occurred at NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi

Possible reason(s):
ADO Error: 0x80004005
Exception occured in Microsoft SQL Server Compact OLE DB Provider: in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->ConnectToDB.vi


This error happen in the DB Tool open Connection.vi 

In the picture you can see how i tried it. Maybe you have an advise or know my mistake.

 

 

 

0 Kudos
Message 7 of 14
(4,214 Views)

Why are you using the strip path? 

What is the value of the "resulting string"

0 Kudos
Message 8 of 14
(4,207 Views)

Hello Fabian210298,

in LabVIEW go to Tools -> Create Data Link and make in this configuration dialog your settings and test, if the connection works. A second way is to create a txt file and rename it to xxx.udl, double click on it and also the dialog will appear.

best regards
Alexander
0 Kudos
Message 9 of 14
(4,202 Views)

The problem is, that i tried before to use a data link, but i no provider could make a connection to the database. 

Which provider can connect the SQL CE 4.0?

Is it possible to add a new provider?

best regards

Fabian 

0 Kudos
Message 10 of 14
(4,196 Views)