11-03-2008 06:48 PM
first of all, I've been struggling to get this to work for quite some time. I'm using Microsoft Access 2007 to call a simple LabVIEW shared library that I created. The dll takes two inputs (Num1, Num2) and returns the sum of the two numbers. Here is the function that LabVIEW creates:
long AddNumbers(long Num2, long Num1)
In Access 2007, I use the following VBA code to call the dll:
Option Compare Database
Private Declare Function AddNumbers Lib "C:\AddNumberDll.dll" (ByVal num1 As Long, ByVal num2 As Long) As Long
Private Sub Command0_Click()
MsgBox AddNumbers(2, 3) ' application freezes at this point!
End Sub
Any suggestions? Thanks!
11-04-2008 06:09 AM
11-04-2008 01:24 PM
Ok, here's some new information.
I copied the shared library to another computer, and used Microsoft Access 2007 to call the dll, and it worked! Both machines have LabVIEW 7.1, and Microsoft Office 2007 installed.... so what could be different?
11-04-2008 05:05 PM
Hi brents1,
A similar issue has been discussed at this thread. It appears that as you have already succesfully used LabVIEW 7.1 on both systems it could have to do with Access2007--the installation on one of the systems might be missing a component.
Ipshita C.
11-04-2008 05:42 PM
11-07-2008 08:04 AM
11-10-2008 11:02 AM - edited 11-10-2008 11:03 AM
I can't use LabVIEW 8.6 because of the following problems:
Our test software was created with LabVIEW 7.1, NI Vision Development Module 7.1, and Vision Builder 2.6.1. Whenever I open the 7.1 project with LabVIEW 8.6, there are a bunch of errors due to the differences in the versions. If I install NI IMAQ 4.1, Vision Builder 2.6.1 no longer works correctly. For example, in VBAI 2.6 whenever I try to implement a pattern matching step, VBAI crashes due to a Call Library Node error. So VBAI 2.6 is completley useless whenever NI IMAQ 4.1 is installed. You would think NI would think about making their software backwards compatable, but I guess not... ![]()
So as you can see, I cannot build my project using LabVIEW 8.6. I MUST use 7.1.
Please help!!!
11-10-2008 04:41 PM
brents1,
So to confirm we have one computer that can use the dll with 7.1 & office 2007 and one that can't? If so has the computer that can't use the dll ever worked with office 2007. You might think about reinstalling Access.
Otherwise, could this be a path issue that the access program is looking for the dll in a specific spot. I saw you reference it at C:\* was that where it was on both computers?
What about speed what are the other physical differences between these 2 computers?
11-11-2008 07:02 AM
Jason,
Yes, that is correct. One computer can use the 7.1 built dll w/ Office 2007, and the other one can't, and never has. I've tried it with Office Professional 2007, and Access Runtime 2007... same result. I've uninstalled and reinstalled MS Access with no luck. Still the same problem.
Yes, the dll is in the same spot on both computers. I've attached a zip file containing the vi, build script, dll, and .mdb. Just unzip it into the C:\ directory and give it a try.
As far as physical differences between the computers: The computer that works: Pentium M 1.7 GHz, 512Mb RAM, Windows XP SP3. The computer that does not work: AMD Athlon XP 2700+ 2.17 GHz, 768Mb RAM, Windows XP SP3.
Some other interesting things: As you know, the 8.6 build dll works with Access 2007 w/ no problems. In the MS Access form I created, if you click on the "Calculate with 8.6 dll" first, then click on "Calculate with 7.1 dll" next, it will work! But if I click on "Calculate with 7.1 dll" first, MS Access and LabVIEW runtime will freeze.
11-11-2008 03:58 PM