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: 

database

Solved!
Go to solution

Hi I am Mervin,

 

I am currently working with the Labview Database Connectivity Toolkit.

The following are the softwares i am working with

 

Labview 2012 : 32 bit edition.

Microsoft office 2010 32 bit version

MS Access 2010 32 bit 

OS:Windows 7 64 bit system

 

AccessDatabaseEngine_office 2010_x86.exe - installed.

I created an empty database in MS Access and also setup a System DSN setting by adding a suitable ODBC Driver(in this case the MS Access Driver).

 

Then I have created UDL Connection by adding Microsoft Jey 4.0 OLE DB provider and referring the empty database.mdb which i have created in previuos step.

 

Then I have saved the file as TestUDL.udl

 

I have added this path to the "file connection reference" I have included the path where "TestUDL.udl" is located.Now when I run the program as mentioned in the attahcment it gives up an error as shown in screenshot.

 

When I checked up in earlier support  forums it is mentioned tat this error would probably occur when a 64bit ODBC.exe program is used to  Data Source Name Access on a 32 bit MS office operating software.

 

The second problem is only  "DatabaseEngine_office 2010_x64.exe" contains the driver for MS Access which gets installed on a "64 bit MS office"

There is no MS Access Driver package conatined on "DatabaseEngine_office 2010_x86.exe".

 

SO currently,....Windows 7(x64)->MS Office(32 bit)->DatabaseEngine_office 2010_x86.exe->Labview 2012(x86). is the platform i am using.

i have also tried in another computer  "Windows 7(x64)->MS Office(64 bit)->DatabaseEngine_office 2010_x64.exe(with MS Access Driver)->Labview 2012(x86). is the platform i am using.

In both cases i am getting an error which i have updated in the screenshots attachments..

Can u give any suggestions of how to get this solved...........

 

Download All
0 Kudos
Message 1 of 9
(3,531 Views)

Your error image shows that nothing executed inside the For loop because your controls that feed the auto-indexing tunnels don't have any data in them.  This leaves the outputs as the default of the data type and the database connection feeding the Close Connection VI will give an error.  Replacing the tunnels with shift registers is generally a good practice in the event that the For loop doesn't execute.  Putting information into the data controls should get your VI to work.

 

Example_VI_BD.png

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 2 of 9
(3,520 Views)

I have modified the program by using shift registers to pass data across tunnels as shown in the attachements.Also i have provided inputs to the auto indexing tunnels of the for loop.

 

I once again ame across with another error as shown in the snapshot.This time some datas have got recorded in the Accesss database but was not complete.

I am just curious to know where i am wrong...

0 Kudos
Message 3 of 9
(3,480 Views)

@Maq23 wrote:

I have modified the program by using shift registers to pass data across tunnels as shown in the attachements.Also i have provided inputs to the auto indexing tunnels of the for loop.

 

I once again ame across with another error as shown in the snapshot.This time some datas have got recorded in the Accesss database but was not complete.

I am just curious to know where i am wrong...


You're trying to write 3 values (2 strings and a double) in the same field (5). That's why the error message says duplicate destination '5'. Columns is an array containing the name (header) of the record fields you want to insert values in. In your case Columns array should contain 3 different values.

 

Ben64

0 Kudos
Message 4 of 9
(3,468 Views)

I have updated with different column numbers from my previous errors.All i need is i have to get all datas in 1st , 2nd and 3rd columns into the access database.When i run the program with a No.of iterations =3...

 

The first three datas of every coulmn is inserted into access database.On the 4th iteration it is giving an error as updated in the snapshot stating that the field size is too small "Try to pass less no of data".

 

Is there any way to adjust the settings in the "Insert data Tool.vi".....

 

0 Kudos
Message 5 of 9
(3,430 Views)

I searched for your error code (ado 0x80040E57) and the first enty was from an NI forum LabVIEW question.

 

In that post, the length of the field in the DB that was receiving a string was set to 5, but the user was submitting a string longer than 5 characters.

 

It looks like your third string is 12 characters long. What is the size of the field in your DB?


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 9
(3,406 Views)

I recommend you read the LabVIEW Help for the DB Tools Insert Data VI. It is specified that when you set create table to TRUE, for string columns types the size is set equal to the size of the data. In your case the first data value is Pass so the size is set to 4.

 

Ben64

0 Kudos
Message 7 of 9
(3,398 Views)

It works...... I adjusted the field size in MS Access .... In accordance to the string data I intend to submit...

Cheers!!

 

Smiley Happy

 

0 Kudos
Message 8 of 9
(3,392 Views)
Solution
Accepted by topic author Maq23

Then you should mark the solution as accepted and give kudos!

Ben64

Message 9 of 9
(3,310 Views)