<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>22 Jun 2017 16:35:00 Z</lastBuildDate><pubDate>21 Jun 2017 22:42:00 Z</pubDate><description>I have a connection var that is defined in the project in it code. I use this connection var to successfully connect to my remote db. I can close the connection, modify the connection var to use local files and successfully connect to my local db. The problem is when I try to switch back to remote it's creating a new db somewhere. I can't find where the data is stored, but it's definitely stored somewhere. I get no errors when running the code. I can not understand why I can't reconnect to the remote db.&#13;
&#13;
Here's my connection code. See anything suspect?:&#13;
&#13;
ConnectRemoteDatabase() // Parameters of the database connection for 'Main' files in the analysis UserServer..Server = "myDbServer.com" UserServer..User = gsUserName UserServer..Password = gsPassword UserServer..Database = gsDatabase UserServer..Provider = hAccessHFClientServer UserServer..CryptMethod = hCryptNo UserServer..Compression = True UserServer..ExtendedInfo = "WD Connection Timeout = 8;" // Establish the connection IF NOT HOpenConnection(UserServer) THEN Error("Error opening user database.") RESULT False ELSE // Open and connect all files in the main folder Analysis IF NOT HChangeConnection("Main", UserServer) THEN Error("Error connecting to user database.") RESULT False END END RESULT True&#13;
&#13;
DisconnectionCode() // This runs before ConnectRemoteDatabase() and ConnectLocalDatabase(). I have tried using either line or both. IF NOT HClose("*") THEN Trace("Error closing files") IF NOT HCloseConnection(UserServer) THEN Trace("Error closing connection")&#13;
&#13;
ConnectLocalDatabase() UserServer..Server = "local data" UserServer..Provider = hAccessHF7 UserServer..Compression = True IF NOT HOpenConnection(UserServer) THEN Error(HErrorInfo()) ELSE // Open and connect Config file HChangeConnection("Main", UserServer) END</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis/read.awp</link><title>[WD20] Switching a connection var from client/server to classis files and back to client/server</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61411/read.awp</comments><pubDate>22 Jun 2017 16:35:00 Z</pubDate><description>HChangeDir(Main,"")&#13;
Thanks Fabrice!</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61411/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61411/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis/read.awp">[WD20] Switching a connection var from client/server to classis files and back to client/server</source><title>Re: [WD20] Switching a connection var from client/server to classis files and back to client/server</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61410/read.awp</comments><pubDate>22 Jun 2017 14:08:00 Z</pubDate><description>Hi Curtis,&#13;
&#13;
you are doing a changeconnection to classic, but you are NOT doing a hchangedirectory to DEFINE where your files s…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61410/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis-61410/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/61400-wd20-switching-connection-var-from-client-server-classis/read.awp">[WD20] Switching a connection var from client/server to classis files and back to client/server</source><title>Re: [WD20] Switching a connection var from client/server to classis files and back to client/server</title></item></channel></rss>
