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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you CHANGE the CONNECTION of a Remote View?

Status
Not open for further replies.

jrumbaug

Programmer
Apr 27, 2003
90
US
The remote views that my laptop accesses from my server at home, do not want to work with my server at "work". If I try to BROWSE a defined remote view I get the error "Conectivity Error:[Microsoft][ODBC Drive Manager] Data source name not found and no default driver specified". I realize that it is because I selected a specific connnection when I visually created them. How can I programatically change (even temporarily) the connection of a saved remote view? I know how to do it with SPT, but not a saved remote view.

Jim Rumbaugh
 

Hi Jim,

As far as I know, you can't change the connection name directly, as it's read-only. But you can use DBSETPROP() to change any of its proeperties, including the connection string (which in turn contains the driver name, database name, etc).

So, I supposte the thing to do is to call DBGETPROP() for the view, to find its ConnectName property, then call DBSETPROP() for the connection, and use it to change the connection properties.

Hope this makes sense. If there's any easier way, I hope someone can tell us.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Mike,

I now see what you mean and I have a plan. I'll let you know how it goes.

Jim Rumbaugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top