LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Connection to Access Database

Hi

I'm having some problems making a connection to a Access database from
within Labview. I've got all the appropriate database extensions installed
but i'm having problems wiring a connection up.

Are there any tutorials about making a database connection from labview. Or
if anyone has experience in this area i'm listening! (i would appreciate it
if anyone could chuck a few examples over.. eg. connecting and sending a SQL
query or something similiar?)

Ideally i would like it to work on any PC without setting up a ODBC
connection.

thanks

D
0 Kudos
Message 1 of 8
(3,860 Views)
If you were to do a search for database in this forum, you'd find a lot of examples and discussion on the best way to connect. Here's one link that might help if your're using ActiveX - http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000041E0000&USEARCHCONTEXT_CATEGORY_0=_49_%24_6_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&UPostedFromTimeSearchArg_0=22&UPostedFromTimeSearchArg_1=2&UPostedFromTimeSearchArg_2=2001&UPostedFromTimeSearchArg_S=4&UPostedToTimeSearchArg_0=18&UPostedToTimeSearchArg_1=2&UPostedToTimeSearchArg_2=2002&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_0=2&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=Labview+Connection+to+Access+Database&USEARCHCONTEXT_QUESTION_S=0.

P
ersonally, I'd recomend either NI's Database Connectivity Toolkit or something like LabSQL from Jeffrey Travis (http://www.jeffreytravis.com/lost/). Since ODBC comes with all of the Windows OS's, I think its a lot easier to set up than having to install all of the Access ActiveX components on every PC. I don't have the link, but I remember someone even posting a VI that programmatically created the necessary DSN.
0 Kudos
Message 2 of 8
(3,860 Views)
is it possible to setup a DNS-less connection to a access database as i
don't want to have to setup a ODBC driver on the PC in question. Can't i
somehow have the connection string contain all of the required information
(such as the driver info and db location?)

As i haven't got admin rights to get to the control panel....

thanks

D.

"Dennis Knutson" wrote in message
news:506500000005000000AA600000-1012609683000@exchange.ni.com...
> If you were to do a search for database in this forum, you'd find a
> lot of examples and discussion on the best way to connect. Here's one
> link that might help if your're using ActiveX -
>
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5
06500000008000000041E0000&USEARCHCONTEXT_CATEGORY_0
=_49_%24_6_&USEARCHCONTEX
T_CATEGORY_S=0&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&UPostedFromTimeSearchArg
_0=22&UPostedFromTimeSearchArg_1=2&UPostedFromTimeSearchArg_2=2001&UPostedFr
omTimeSearchArg_S=4&UPostedToTimeSearchArg_0=18&UPostedToTimeSearchArg_1=2&U
PostedToTimeSearchArg_2=2002&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_
0=2&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=Labview+Connection+to+
Access+Database&USEARCHCONTEXT_QUESTION_S=0.
>
> Personally, I'd recomend either NI's Database Connectivity Toolkit or
> something like LabSQL from Jeffrey Travis
> (http://www.jeffreytravis.com/lost/). Since ODBC comes with all of the
> Windows OS's, I think its a lot easier to set up than having to
> install all of the Access ActiveX components on every PC. I don't have
> the link, but I remember someone even posting a VI that
> programmatically created the necessary DSN.
0 Kudos
Message 3 of 8
(3,860 Views)
Afaik, the only way to connect to an Access database without ODBC is by using ActiveX.
0 Kudos
Message 4 of 8
(3,860 Views)
well i've never used any ActiveX commands in Labview, especially when
concerned with connecting to a database..

don't suppose you've got an example of one have you?

thanks

D


"Dennis Knutson" wrote in message
news:506500000005000000CE600000-1012609683000@exchange.ni.com...
> Afaik, the only way to connect to an Access database without ODBC is
> by using ActiveX.
0 Kudos
Message 5 of 8
(3,860 Views)
The first link that I sent has an ActiveX example.
0 Kudos
Message 6 of 8
(3,860 Views)
Hi and thanks for responding.

I've got this example of the Active X database connection now but i can't
seem to get it working..

basically i'm unsure of where i should put the database (remember this is
the first time i've ever done anything like this with labview, so something
obvious to you might not be to me) and when i try and run the vi the error
message that i get out is:

Exception occured in DAO.Workspace, ODBC--call failed.. Help Path is
jeterr40.chm and context 5003146 in Number or Rows.vi->Activex Table
Example.vi

do i need to change any of the example to get it working? is there anything
i need to know?

thanks again

D


"Dennis Knutson" wrote in message
news:506500000005000000ED600000-1012609683000
@exchange.ni.com...
> The first link that I sent has an ActiveX example.
0 Kudos
Message 8 of 8
(3,860 Views)
I've been successful connecting to Access database using ActiveX using
either DAO or the newer ADO.

Linda



On Tue, 19 Feb 2002 14:58:53 -0000, "D"
wrote:

>well i've never used any ActiveX commands in Labview, especially when
>concerned with connecting to a database..
>
>don't suppose you've got an example of one have you?
>
>thanks
>
>D
>
>
>"Dennis Knutson" wrote in message
>news:506500000005000000CE600000-1012609683000@exchange.ni.com...
>> Afaik, the only way to connect to an Access database without ODBC is
>> by using ActiveX.
>
>
0 Kudos
Message 7 of 8
(3,859 Views)