TheCurrent Posted April 7, 2011 Share Posted April 7, 2011 is it possible to use a secure connection to MSSQL server over the internet? i need to use ssl to connect to MSSQL server over the internet, please help Link to comment Share on other sites More sharing options...
MrMitchell Posted April 7, 2011 Share Posted April 7, 2011 is it possible to use a secure connection to MSSQL server over the internet?i need to use ssl to connect to MSSQL server over the internet, please helpYah! How are you connecting though? You didn't say Link to comment Share on other sites More sharing options...
TheCurrent Posted April 8, 2011 Author Share Posted April 8, 2011 (edited) hello, this is my code #include <_sql.au3> #include <Array.au3> $Handle= _SQL_Startup() If $Handle= $SQL_ERROR Then ConsoleWrite(@CRLF & "Start Connect DesignMachine 3 Error" & @CRLF) EndIf $Host = "somehost.somehostsoftware.com,1117\somehost2\testplace" If _sql_Connect($Handle, $Host, "Reports", "username", "pass") = $SQL_ERROR Then ConsoleWrite(@CRLF & "Start Connect DesignMachine 4 Error" & @CRLF) _SQL_Close() EndIf $Query = "SELECT COUNT (*) FROM [Reports].[dbo].[Pref]" Local $hQuery, $Query_Rows $hQuery = _SQL_Execute(-1 = -1, $Query) $iRecords = _SQL_FetchData($hQuery, $Query_Rows) ConsoleWrite("_SQL_GetTable2D - Error: " & @error) If $iRecords = $SQL_OK Then ConsoleWrite(@CRLF & "successful. rows = " & $Query_Rows[0] & @CRLF) Else ConsoleWrite(@CRLF & "Failed" & @CRLF) EndIf I get this error, C:\Program Files\AutoIt3\Include\_sql.au3 (217) : ==> The requested action with this object has failed.: $ADODBHandle.Open("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";") $ADODBHandle.Open("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";")^ ERROR Edited April 8, 2011 by TheCurrent Link to comment Share on other sites More sharing options...
MrMitchell Posted April 8, 2011 Share Posted April 8, 2011 Oh sorry maybe not then...I misunderstood the question. If you start a VPN connection to the network your SQL server is on, then use the server's network name or internal IP, that should work (if it's an option) right? Who owns the SQL server? Link to comment Share on other sites More sharing options...
TheCurrent Posted April 8, 2011 Author Share Posted April 8, 2011 i need to confirm 3 things1. is this in the correct format for external host?$Host = "somehost.somehostsoftware.com,1117\somehost2\testplace"2. Can autoit really do client side secure connection?3. do i need need to use openssl to do this connection? 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