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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top