Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
Connecting a Database (revisited) |
Wed, Apr 2 2008 8:02 AM | Permanent Link |
"Adam H." | Hi Guys,
Back again. Maybe I should call it a night. I now have a problem where my database will not show in my EDBDatabase component. Only 'configuration' is found in the list of databases. I have set the Session.LocalConfigPath and the Engine.ConfigPath to the same directory (where my data is located). (If I don't set the Session.LocalConfigPath the IDE goes back into the wierd 'looping/flashing' of the error message and ends up crashing). In short, just to rehash what I've done: 1) Drop the EDBEngine component on the form. Set the ConfigPath to my data directory, and UseLocalSessionEngineSettings to True. 2) Drop the EDBSession component on the form. Set the LocalConfigPath to my data directory, and set the username / password and sessionname properties. 3) Drop the EDBDatabase component on the form, and selected the session I named in (2). 4) When I go to select the database it only shows 'configuration' in the dropdown list. The database and table I'm trying to access was originally created in ElevateDB Manager (Unicode). I can reload / access the data through this, but not through my IDE. Any thoughts? Thanks & Regards Adam |
Wed, Apr 2 2008 8:42 AM | Permanent Link |
Uli Becker | Adam,
> I have set the Session.LocalConfigPath and the Engine.ConfigPath to the > same directory (where my data is located). > The database and table I'm trying to access was originally created in > ElevateDB Manager (Unicode). I can reload / access the data through > this, but not through my IDE. The configuration file in you data-directory is not neccessarily identical with the config-file you use in EDB-Manager. Just check in EDB-Manager (EditSession | Local Configuration) if the config-Path is identical with your data-path. I suppose it's not. If not copy this path to your IDE-configuration and it should work. Regards Uli |
Wed, Apr 2 2008 9:01 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
I have that occasionally and I think its when I haven't set the config path correctly. Reading your post for the umpteenth time you set the config paths to your data directory. Is that where the config file lives? Roy Lambert [Team Elevate] |
Wed, Apr 2 2008 2:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< Back again. Maybe I should call it a night. I now have a problem where my database will not show in my EDBDatabase component. Only 'configuration' is found in the list of databases. >> That indicates that a) you don't have things hooked up correctly in the application or b) you don't have an existing configuration file in the location that you've specified for the ConfigPath. << I have set the Session.LocalConfigPath and the Engine.ConfigPath to the same directory (where my data is located). (If I don't set the Session.LocalConfigPath the IDE goes back into the wierd 'looping/flashing' of the error message and ends up crashing). >> What is the LocalConfigPath set to prior to you changing it ? Is it in the Program Files directory tree ? -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 2 2008 6:53 PM | Permanent Link |
"Adam H." | Hi All,
And thanks for the replies. You were all correct - the config file was in a different location. (I was still thinking DBISam where you just need to point the component to the data location. Got a bit to learn!) In regards to the configuration files - is it acceptable practise to put these in the same directory as the data, or is it preferrable to have them in a seperate directory - or does it not matter? Also - is there a way to set a 'relative path' to both the configuration files (from the session component) and the data (from the configuration files). ie - If I have my project in: c:\program files\myproject and Data in c:\program files\myproject\mydata I would like to be able to specify in the executable that the config is located in: ..\mydata\ And within the config file that the data to be located in: ..\ (This way - a user can have the the entire directory and subdirectory containing the exe and data files, and run it from where they want such as a flash disk between computers without having to change the database and config file each time.) Thanks & Regards Adam. |
Thu, Apr 3 2008 2:31 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
> I was still thinking DBISam where you just need to >point the component to the data location. I'm still doing it >In regards to the configuration files - is it acceptable practise to put >these in the same directory as the data, or is it preferrable to have them >in a seperate directory - or does it not matter? No reason why they shouldn't be but my preference is to put it in the same directory as the exe, but then I ignore MS guidance and do not put my programs under Program Files which would cause problems under Vista. So far I have one app with a single database under it, a second where the structure is App (inc config) - company - live - archive - company - live - archive > >Also - is there a way to set a 'relative path' to both the configuration >files (from the session component) and the data (from the configuration >files). Nope, you'll have to build it yourself using application.exename or somesuch to get the path. Roy Lambert [Team Elevate] |
Thu, Apr 3 2008 3:17 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< In regards to the configuration files - is it acceptable practise to put these in the same directory as the data, or is it preferrable to have them in a seperate directory - or does it not matter? >> We usually recommend that you keep it elsewhere. It doesn't matter where, but it avoids issues where you simply want to delete the database directory without also completely deleting all of the configuration information. << Also - is there a way to set a 'relative path' to both the configuration files (from the session component) and the data (from the configuration files). >> No. You should always use absolute path names to avoid issues. You can use the ALTER DATABASE statement to adjust the path, if necessary, during application start-up. Just query the Databases table in the Configuration database and make sure that the database paths are all set properly relative to the desired directory: http://www.elevatesoft.com/manual?action=mantopic&id=edb1sql&category=3&topic=54 -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |