ConnectionString variable

J

Joel Barish

I'm going completely insane...

Why does this work:

Sub Window_onLoad()
Connect("Sales")
End Sub
Sub Connect(strCube)
dim strDB
strDB = "Financial"
ptable.ConnectionString = "provider=msolap.2; " & _
"data source=devserver; initial catalog=" & strDB
ptable.DataMember = strCube
End sub

But this doesn't:
Sub Window_onLoad()
Connect("Financial", "Sales")
End Sub
Sub Connect(strDB, strCube)
ptable.ConnectionString = "provider=msolap.2; " & _
"data source=devserver; initial catalog=" & strDB
ptable.DataMember = strCube
End sub

Thanks for any help...
 
J

Joel Barish

Never mind... I was having a brain coma.

I forgot to add Call when adding the second argument.
 
Top