General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>I am working out strategies for accessing SQL data from VFP. I'll be using business objects in my maintenance routines, but for reporting purposes, I intend on using SQL pass through.
>
>My concern is if I have a typical statements in my code such as :
> =SQLEXEC(nHandle1,"SELECT * FROM Table1")
> =SQLEXEC(nHandle1,"SELECT * FROM Table2")
>
>Then at some point later, I wish to move Table1 to a different SQL server. Hence a different connection handle needed for that table. Is there a strategy for handling this, _other_ then using stored procs or views as opposed to T-SQL statements in my SQLEXEC command?
>
>TIA,
>Anthony Letts
Implement two DSN-based connections (as opposed to hard-coded strings in the programs). Initially they would have the same settings but later on they could be changed to point to different servers.
You still have to know upfront which tables are likely to move, to use separate connection handles on them.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only