NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

labVIEW 中用database 访问工具包如何访问远程数据库?

各位高手或者NI工程师:
本人用labVIEW的数据库访问工具包访问远程的数据库,但是不知到如何实现,在DB Tools Open Connection.vi 里是要怎么样设置才能访问远程的数据库呢,我找了好多地方都不知道如何解决这个问题,这个远程的问题如何实现呢?谢谢各位了!
附件里是这个vi,请各位帮忙看看是怎么设置的呢
0 项奖励
1 条消息(共 3 条)
4,976 次查看
怎么没有人回复呢,难道没人知道怎么做吗?NI的工程师会看这里的帖子吗?怎么办呢?
0 项奖励
2 条消息(共 3 条)
4,968 次查看

Data Source Name (DSN):
Way to refer to a specific database. You specify a DSN with a unique name
and by the ODBC driver that communicates with the physical database
(local or remote). You create a DSN using the ODBC Administrator in
Windows.

1.System DSNs work for anyone using that system. For example, no matter who logs onto the machine, system DSNs can be seen by all users, and they are stored in the Registry in the Local Machine section.
2.User DSNs work only for a specific user on a machine. So if someone other than the person who created the user DSN logs onto that machine, then the User DSN will not show up. This DSN is stored in the Registry in the Current User section.
3.File DSNs are not stored in the Registry but rather in a file. That means you can store these DSNs to disk or network and use them on any machine or any user that has access to it.

Do the following to create a DSN for your database:

For a User or System DSN
Select Start » Settings » Control Panel » Administrative Tools » Data Sources (ODBC) in Windows 2000/XP and Start » Settings » Control Panel » Data Sources (ODBC) in Windows 9x/Me
Select either the User or System DSN tab
Select Add » Microsoft Access Driver (*.mdb) » Finish
Give it a Data Source Name and a good description and choose the select button in the database field
Navigate to the location of your access database and select OK
Select OK on the ODBC Microsoft Access Setup window
You should now see your DSN in the User/System Data Source window

For a File DSN
Select Start » Settings » Control Panel » Administrative Tools » Data Sources (ODBC) in Windows 2000/XP and Start » Settings » Control Panel » Data Sources (ODBC) in Windows 9x/Me
Select the File DSN tab
Select Add » Microsoft Access Driver (*.mdb) » Next
Type the name of the DSN (the name of the file should have a dsn file extension)
Select Next » Finish
Choose the select button in the database field
Navigate to the location of your access database and select OK
Select OK on the ODBC Microsoft Access Setup window
Select OK on the ODBC Data Source Administrator window
The DSN file should now be located in the location you specified in step 4

你可以创建一个file的dsn 链接到远程的数据库,按照以上的步骤

我查的资料并没有例子,你可以试一下

 

0 项奖励
3 条消息(共 3 条)
4,963 次查看