Solved

How to determine version of Pervasive programatically

Posted on 2010-09-16
1
354 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
postgres queries -- need opinions 1 72
Update cached table in H2 database 6 55
syadmin MSSQL 2 66
free version of MSSQL for over 10GB DB 19 60
I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
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…

773 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