From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to link my access database to ODBC?

Solved!
Go to solution
I create a mdb access file i want to link it to the ODBC system dsn programatically.can anyone give me a solution?
kavi
0 Kudos
Message 1 of 40
(5,314 Views)

Hi kavi,

this link shows a VB solution.

http://www.vbforums.com/showthread.php?p=2154170#post2154170

  

Mike

Message 2 of 40
(5,307 Views)

HI mike

 

Thanks for the support u r giving me.

 

I dont know VB is there is any other solution labview 

kavi
0 Kudos
Message 3 of 40
(5,303 Views)
Solution
Accepted by topic author karpaga

Hi kavi,

attached you'll find an example to create an udl link to your database. You need a template udl file for that, create it it for an existing database. The attached vi, needs this template as an input to copy the file and change the liked mdb.

 

Hope it helps.

Mike

Message 4 of 40
(5,295 Views)
kavi,

LabVIEW Database Connectivity toolkit is the tool you need to connect to mdb by ODBC. It has a bunch of examples show how to connect to database, query/insert data.
0 Kudos
Message 5 of 40
(5,287 Views)
http://sql-lv.sourceforge.net/
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 6 of 40
(5,281 Views)

HI

 

i already create a mbd using create mdb vi .I attached it.

 

Then for connecting it to system dsn in ODBC i have to go into control panel ..........and do it. How to do it programatically?

kavi
0 Kudos
Message 7 of 40
(5,243 Views)

Hi kavi,

did you try my solution with the udl file? Where do you have problems with it?

 

Mike

0 Kudos
Message 8 of 40
(5,233 Views)

is it a solution for ODBC system dsn link?I cand understand.

 

I tried ur logic

kavi
0 Kudos
Message 9 of 40
(5,227 Views)

Hi kavi,

the new database path shall contain the path to the database to create not to an udl file. It should be something like "test.mdb". The other path input is the path to the udl template, which will be copied and updated with the new information. The result is the udl file which you need for the "DB Tools Open Connection.vi" to open your new created database.

 

Mike

0 Kudos
Message 10 of 40
(5,216 Views)