Is there another way to connect to SQL when running on a different port?

  • Well, this sucks ... I build my connection to a destination server based on an input variable (@ServerName). I allow for multiple names to be passed, comma separated. I then use a split function to split them appropriately. Well ... when my server is running on a different port, passing in that comma for the port number, screws up my connection and splits it into two different connections.

    So my question is ... is there another way to connect to SQL when it's running on a different port outside of ServerName,Portname? If not ... is there a way to have reporting services pass a different deliminator (other than a comma) when using a multi valued parameter?

    Thanks

  • So you are letting the user choose from a list of servers. Your list of servers has ServerName,PortNumber and this is what you are passing.

    Why not change this list to ServerName: PortNumber in your list and then after parsing string at the commas, replace the colon with a comma?

  • I only have one server in the environment that runs on a different port (don't ask why). Anyways, I tried servername:port# and that doesn't work ... only way I can connect is using a comma.

  • Yes, that's the only way you can connect, but the delimiter you use can be changed before making the call.

  • Ah ok, I see what you're saying ... yeah that works too. For now I just used an alias on the source server, but I think I'll take your route.

    Thanks

  • Still haven't had that coffee, huh?

    The alias is a good idea though.

  • Michael Earl (9/8/2008)


    Still haven't had that coffee, huh?

    The alias is a good idea though.

    haha yeah, I swear ... I'm slow on Mondays ... never been a coffee drinker though 🙁 Yeah the alias works, but I hate having additional dependencies. I took your route, works like a champ.

    Thanks again

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply