Solved

How to determine version of Pervasive programatically

Posted on 2010-09-16
1
333 Views
Last Modified: 2012-05-10
I am running into alot of SQL problems because PSQL does not seem to be backwards compatible. I am withing with 2000i all the way to 11 so is there an easy way to determine the version?
0
Comment
Question by:hainansyndrome
1 Comment
 
LVL 28

Accepted Solution

by:
Bill Bach earned 500 total points
ID: 33694923
This depends on which interface you are using.

If you are accessing the Btrieve interface, as you can issue a B_VERSION call.  If you do this after you open a file, you will get back multuiple 5-byte Version blocks which give you the major version, minor version, and engine type of the client, server, and local engine (if applicable).  See the documentation on the B_VERSION call for details.

If you are working within true SQL, I am not aware of any published built-in command that can get you the exact version information from SQL.  This is the toughest one.

If you are working via ODBC, then you can call the SqlGetInfo() function and pass it a parameter of 7, which is SQL_DRIVER_VER.  The returned value will be your complete version number.  The call looks like this in ODBCTest:

SQLGetInfo:
                        In:                        ConnectionHandle = 0x00222D00, InfoType = SQL_DRIVER_VER=7, InfoValuePtr = 0x006C0808, BufferLength = 300,
                                                            StringLengthPtr = 0x006AB418, Information Value Type = SQL_C_CHAR=1
                        Return:      SQL_SUCCESS=0
                        Out:                  *InfoValuePtr = "11.00.0173 000", *StringLengthPtr = 14
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now