I'm trying to retrieve a value from a table from an ActiveX Script Task. The code errors on the msgbox line. I'm not sure why. Any help is greatly appreciated.
Dim strSQL
Dim strResult
Dim conn
Dim dsn
Set conn = CreateObject("ADODB.Connection")
dsn = = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=DATABASE;Data Source=SERVER"
conn.Open dsn
strSQL = "Select top 1 FIELD1 from TABLE order by FIELD1 "
strResult = conn.Execute(strSQL)
msgbox "The value is " & strResult
Dim strSQL
Dim strResult
Dim conn
Dim dsn
Set conn = CreateObject("ADODB.Connection")
dsn = = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=DATABASE;Data Source=SERVER"
conn.Open dsn
strSQL = "Select top 1 FIELD1 from TABLE order by FIELD1 "
strResult = conn.Execute(strSQL)
msgbox "The value is " & strResult