PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: HendersonS on April 25, 2023, 07:52:48 PM

Title: ODBC Views Issue
Post by: HendersonS on April 25, 2023, 07:52:48 PM
hello All,

we are trying to query data from a view in excel and we are getting this error (attached in the screenshot).

The thing is that when we try the query from Excel to the same file from which the view was created, we can access the data.

What could be happening?

we are using a Pxplus Sql ODBC Driver Version 7 and Pxplus Version 19.1
Title: Re: ODBC Views Issue
Post by: Devon Austen on April 26, 2023, 08:03:55 AM
Views require special configuration so the ODBC driver knows where it can find the DLL to process the view.

Check out this answer in the PxPlus ODBC FAQ: https://manual.pvxplus.com/?odbc/odbc_faq.htm#Mark6

Hopefully that will help.

Note that the PxPlus where the pvxwin32.dll is found needs to be properly activated for this to work.
Title: Re: ODBC Views Issue
Post by: HendersonS on April 26, 2023, 08:33:33 AM
Hi devon,

 thanks for your answer, we did that setup, in fact we have other views that work without errors, but this one has that error.
Title: Re: ODBC Views Issue
Post by: Devon Austen on April 26, 2023, 08:59:19 AM
I would check that the data in the tables in the problem view fits within the field size defined in the data dictionary. I think I have seen errors like this before when the data in the table that makes up the view is incorrect.
Title: Re: ODBC Views Issue
Post by: HendersonS on April 26, 2023, 11:42:49 AM
thanks, i'll check it out
Title: Re: ODBC Views Issue
Post by: HendersonS on April 28, 2023, 11:41:39 AM
hi devon,

If I have the sql odbc driver installed as a client, in the options tab I can include an address of a network shared folder, for example: \\12.8.1.54\PXPlus19\Pxplus, this being the directory where the pvxwin32.dll is located? With that configuration, would it show the views?
Title: Re: ODBC Views Issue
Post by: Devon Austen on April 28, 2023, 12:27:08 PM
In the more recent version of the PxPlus SQL ODBC Driver and PxPlus SQL Server the path to views DLL/Lib is configured on the server side not the client side. On the server you can point it to any directory path to a directory that contains the pvxwin32.dll. A network path can work but it may be less reliable if the connection is not very stable and fast.

If you are using an older version you may be able to resolve your issue by updating to the latest as many bugs have been fixed over the years.
Title: Re: ODBC Views Issue
Post by: HendersonS on May 02, 2023, 07:46:30 AM
devon, Thanks for your answer, I was able to get it working.
Title: Re: ODBC Views Issue
Post by: Devon Austen on May 02, 2023, 08:18:40 AM
Excellent, I am glad you were able to get it working.