Solved

How to determine version of Pervasive programatically

Posted on 2010-09-16
1
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about achieving the basic levels of HRIS security in the workplace.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…

733 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