Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection code works in Excel but not in Extra

Status
Not open for further replies.

BCapel

IS-IT--Management
Sep 18, 2009
1
US
I am trying to connect to our mainframe d/b to issue some SQL statements within an Extra macro but the connection keeps bombing out. The same code works fine in an Excel macro so it's not the code, it must be something else. Here is the code.

Sub Main

dim sys as object, sess as object, myscreen as object

set sys = createobject("EXTRA.System")
set Sess = sys.activesession

dim cn_dat as object
dim rs_dat as object

set cn_dat = createobject("adodb.connection")

cn_dat.open "Provider = MSDASQL" & _
"Data Source=CA-Datacom Mainframe;" & _
"User Id =bc01q;" & _
"Password =1111"

'Recordset logic goes here once the connection works

End Sub

Any help would be greatly appreciated.

Thanks, Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top