09-04-2013 02:03 PM
Hi all,
I've developed program that query data from MySQL data base. It works fine till I publish it as a web service. While running program, I receive errorCode and errorDesc as follows:
errorCode=-2147467259
errorDesc=NI_Database_API.lvlib:DB Tools Open Connec (String).vi->checkLog.vi->vigateway.vi->vigateway.vi.ProxyCaller<ERR>ADO Error: 0x80004005
Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->checkLog.vi->vigateway.vi->vigateway.vi.ProxyCaller
It happens on LV 2012 and 2013. I've tried also with wi-fi switched off and it's the same. ODBC is supposed to be properly configured (it works for undeployed program).
I'd be grateful for your help.
Best regards,
Piotr
09-05-2013 04:49 AM
Hi Piotr,
By looking at the error, what i think that really cause the problem is not the webservice itself but the DB tools open connection that cause this problem.
The problem might occur because the path of the database specify in the vi might have been changed.
I believe when you deployed the webservices, there is an option under source files "always include". If you can add your database to the project and put it into always include section.
If this cannot solve, can you post the VI here?
Best regards,
TuiTui
09-08-2013 07:36 AM
Hi TuiTui,
I can't find this "always include" option. I must miss it somehow. If you give me a clue, how to find it, I'd be grateful.
I'm posting VI.
Thanks in advance.
Peter
09-09-2013 08:09 PM
Hi piotr,
I believe you are using labview 2013? Is this correct?
The below link shows you how to include content to webservices in labview 2013
http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/ws_static_content/
Hope this help
TuiTui
09-16-2013 08:35 PM
You may also want to make sure that the LabVIEW Web Server and Web Application Server are running and configured on the expected ports. You can do so through LabVIEW menu "Tools >> Options" Choose "Configure Web Applications Server"
. This will open a web browser which will show if the web server is running and on which ports it is publishing data.
09-24-2013 05:44 AM
TuiTui,
I use LV 2013 but I have no idea what to load as static content. I need to have access to data base which content might change. Since I use php to call LV web service I can query data before but it is not pure solution.
Zach_O,
Everything is fine with configuration. VI works when it is run as application and web service but the problematic is VI I attached in previous post.
Kind regards,
Pete
10-13-2013 08:29 PM
Hi piotr,
I haven't heard from you for so long and make me think that the problem already solved.
In this case, may i ask you the ODBC database you have Is it the file DSN ODBC connection or a connection that is specfified in a universal data link(UDL)?
or Is it a system ODBC?
If it is a system ODBC, my suspection is that when you deploy as a webservice, labview cannot find the path to the database.
In this case, i would suggest you to use file DSN ODBC where you can specify the file name and path. After that you use labview to call out a specific path to that UDL or DSN name.
You can go to this example on how to use Labview with file DSN or UDL. Help -> file examples... -> Searcg -> ODBC
If this not possible, i would recommended you to have another VI to deploy as web service and use shared variable to communicate between two VI.
Hope this help
Best regards,
TuiTui
02-18-2016 09:45 AM
I was dealing with the same problem (same error code). Of the different db connection methods that is listed on http://digital.ni.com/public.nsf/allkb/852559036FB6447380256ADF007C3964, most of them are working when running in development mode but it was only the File DSN method I got working when the program was published as a service.
/H