Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Catalog Issue |
Mon, Jul 27 2009 10:35 AM | Permanent Link |
Pete Hollyer | Tim
After I lay down the database on a new machine...the FIRST thing called is the Alter Database to reset the Database Catalog Directory to where ever the User installed the application... My issue is that when I execute the OPEN to open the connection to the database for this Alter sentence...somehow the OLD Path is created on the client machine! When I am building the application I use the path: c:\Documents and Settings\Pete Hollyer\My Documents\Visual Studio 2005\Project\ListBuilder and the Database is in c:\Documents and Settings\Pete Hollyer\My Documents\Visual Studio 2005\Project\ListBuilder\Database This is the original path of the database since that is where I use it. The user installs the Application into the Path c:\Program Files\Listbuilder Which puts the DB into the folder: c:\Program Files\ListBuilder\Database When the database open is issued to Run the ALTER it seems that EDB is creating the path: c:\Documents and Settings\Pete Hollyer\My Documents\Visual Studio 2005\Project\ListBuilder\Database on the client machine!!! How can I stop this???? here is my code for the open and the alter. With Break points being issues on each line of code...I have observed that the path is created on EDBCCon.Open(); EDBConnectionStringBuilder csb = new EDBConnectionStringBuilder(); csb.Name = "ListBuilderConnection"; csb.Description = "ListBuilder Connection Object"; csb.Type = "LOCAL"; csb.ConfigPath = WorkAppPath.AppPath + "\\Database"; csb.Database = "ListBuilder"; csb.UID = "Administrator"; csb.PWD = "EDBDefault"; EDBConnection EDBCCon = new EDBConnection(csb.ConnectionString); //Ensure the ListBuilder Configuration File Path is correct EDBCCon.Open(); <--------------------------------------------------------------------it happens here EDBCCon.ChangeDatabase("Configuration"); EDBCommand dbCommand = new EDBCommand(); string SQL = " ALTER DATABASE ListBuilder PATH '" + WorkAppPath.AppPath + "\\Database'"; dbCommand = new EDBCommand(SQL, EDBCCon); dbCommand.ExecuteNonQuery(); EDBCCon.Close(); EDBCCon.Dispose(); dbCommand.Dispose(); |
Mon, Jul 27 2009 4:21 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Pete,
<< After I lay down the database on a new machine...the FIRST thing called is the Alter Database to reset the Database Catalog Directory to where ever the User installed the application... My issue is that when I execute the OPEN to open the connection to the database for this Alter sentence...somehow the OLD Path is created on the client machine! >> Set the DATABASE property in the connection string to 'Configuration' and that will resolve this situation. The general rule of thumb is don't access any database directly until you have it set up the way that you want. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |