Jump to content

SQL Database Version


Recommended Posts

Hello

I need the ability to query and return the database version of a current SQL 2005 database. Can someone assist / point me in the right path.

Thanks

http://www.sqlite.org/version3.html

more compact format for database files.

$File = FileOpen("database.DB",0)
$FileRead = FileRead($File,15)
MsgBox(0,"",$FileRead);SQLite format 3
Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

If the _SQL.au3 file you are reffering to is mine from my signature below then this

Func _ADOVersion($ADODBHandle = -1)
    
    If $ADODBHandle = -1 Then $ADODBHandle = $SQL_LastConnection
    
    If Not IsObj($ADODBHandle) Then
        $SQLErr = "Invalid ADODB.Connection object, use _SQL_Startup()"
        Return SetError($SQL_ERROR, 0, $SQL_ERROR)
    EndIf
    
    Return SetError($SQL_OK,0,$ADODBHandle.Version)
    
EndFunc

Will get you the ADO version

Link to comment
Share on other sites

SQL information if using the _SQL.au3 from my signature below

Local $aRow
    $iRval = _SQL_QuerySingleRow(-1,"SELECT  @@VERSION",$aRow)
    If $iRval = $SQL_OK then Msgbox(0,"SQL Version", $aRow[0])
Edited by ChrisL
Link to comment
Share on other sites

Thanks ChrisL

That has got me started. However, it is only returning the sql engine information and not the database *build* version. Sorry, might of asked the wrong question at the start of this thread

Looks like this is quite a grey area, as I have been searching on the sql forums with no luck. Will need to check the tables of the database to bring up the right command.

*UPDATE*

OK looking through the database find my stored procedure that gives me the database build version. Using your _SQL_QuerySingleRow function - works a treat with SQL 2005 express. Big Thanks ChisL

Edited by Alpinestar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...