Alpinestar Posted August 6, 2009 Share Posted August 6, 2009 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 Link to comment Share on other sites More sharing options...
Synthesis Posted August 6, 2009 Share Posted August 6, 2009 Do you mean with SQL Injection? Link to comment Share on other sites More sharing options...
Alpinestar Posted August 6, 2009 Author Share Posted August 6, 2009 Not sure was thinking in the lines of OSQL shellexecute. Noticed a _SQL udf but it does not contain the function of database version. Link to comment Share on other sites More sharing options...
Alpinestar Posted August 7, 2009 Author Share Posted August 7, 2009 Has anyone got any advise please ??? Link to comment Share on other sites More sharing options...
wolf9228 Posted August 7, 2009 Share Posted August 7, 2009 (edited) 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 August 7, 2009 by wolf9228 ØµØ±Ø Ø§Ù„Ø³Ù…Ø§Ø¡ كان هنا  Link to comment Share on other sites More sharing options...
ChrisL Posted August 7, 2009 Share Posted August 7, 2009 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 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted August 7, 2009 Share Posted August 7, 2009 (edited) 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 August 7, 2009 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Alpinestar Posted August 7, 2009 Author Share Posted August 7, 2009 (edited) 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 August 7, 2009 by Alpinestar Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now