?
Solved

How to determine version of Pervasive programatically

Posted on 2010-09-16
1
Medium Priority
?
385 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 29

Accepted Solution

by:
Bill Bach earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
Suggested Courses

807 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