Solved

How to determine version of Pervasive programatically

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

948 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

19 Experts available now in Live!

Get 1:1 Help Now