SQL connection fails

4 posts in this topic

bourny 0

I am attampting to talk to my Sophos SQL DB using AutoIT. I am using a working script that connects to a different servers SQL db to do other queries but my sophos server refuses the connection - Below is my script

#include <_sql.au3>

$con = _SQLStartup()

If @error then Msgbox(0,"Error","Error starting ADODB.Connection")

_SQLConnect(-1,"MYSOPHOSSERVER","SOPHOSDB","USERNAME","PASSWORD")

if @Error then Msgbox(0,"",$SQLErr)

I get the following colsole output

_sql.au3 (49) : ==> The requested action with this object has failed.:

Share this post

Link to post

Share on other sites

PsaltyDS 25

I am attampting to talk to my Sophos SQL DB using AutoIT. I am using a working script that connects to a different servers SQL db to do other queries but my sophos server refuses the connection - Below is my script

The username and password are DBO on the database required - I am guessing I may need some sort of ODBC data connection set up but not sure how the _sql include file works...

Share this post

Link to post

Share on other sites

bourny 0

Is the parameter "DRIVER={SQL Server}" correct? What I mean is, when you said "my Sophos SQL DB", did you mean your Sophos DB held on a Microsoft SQL Server?

It Appears my server I am connecting to does not like me putting a username and password on the connection - Seems the DB needs locked down a bit more as it is as open as my windows on a hot summer day. It now works if I ommit the username and password and just leave in the server and database name

Thanks

Share this post

Link to post

Share on other sites

PsaltyDS 25

It Appears my server I am connecting to does not like me putting a username and password on the connection - Seems the DB needs locked down a bit more as it is as open as my windows on a hot summer day. It now works if I ommit the username and password and just leave in the server and database name