Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 11 total |
Database Path for local access |
Thu, Feb 15 2007 9:10 AM | Permanent Link |
Michael Baytalsky | Hi Tim,
I'm having problem figuring out how to connect programmatically to a local database. I have an instance of EDBDatabase and a path to local file. The application has its own config file. Could you give an example of code how to connect to a database knowing its local path? I guess what I need is to be able to add or modify database information in config. Also, how do I show database path if it's local. EDBDatabase only provides DatabaseName in config. Should I execute: SELECT Path FROM Databases where Name = :DatabaseName to get that path? Regards, Michael |
Thu, Feb 15 2007 10:13 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I'm having problem figuring out how to connect programmatically to a local database. I have an instance of EDBDatabase and a path to local file. The application has its own config file. Could you give an example of code how to connect to a database knowing its local path? >> Did you already create the database for the application using the CREATE DATABASE statement ? The CD Collector sample application provided with EDB has code that shows how to create the entire catalog, including the database itself, for an application programmatically. It's in the data module unit. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 15 2007 10:59 AM | Permanent Link |
Michael Baytalsky | Tim,
> Did you already create the database for the application using the CREATE > DATABASE statement ? The CD Collector sample application provided with EDB > has code that shows how to create the entire catalog, including the database > itself, for an application programmatically. It's in the data module unit. No, I'm aware of how to create a database if I want a new one. What I'm trying to do is to convert my OpenDatabase dialog, where a user can select whatever database they need - either local or remote. There's no problem with selecting a remote database, however for a local database you need to modify application's config file in order to add database path there. That was my question - how to do that? I'm currently querying config to see if the database with this path already present and if not, create a new database with GUID (random) name and the path required. It is my understanding that creating a database (CREATE DATABASE statement) does not erase data in the select folder if it already has a database. Is there an easier way to get access to local database using only it's folder path? Regards, Michael |
Fri, Feb 16 2007 2:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< No, I'm aware of how to create a database if I want a new one. What I'm trying to do is to convert my OpenDatabase dialog, where a user can select whatever database they need - either local or remote. >> It's the same process. Just use CREATE DATABASE to make sure that there is a name -> path connection in the configuration file for the database. << I'm currently querying config to see if the database with this path already present and if not, create a new database with GUID (random) name and the path required. It is my understanding that creating a database (CREATE DATABASE statement) does not erase data in the select folder if it already has a database. >> That is correct, and you are doing what you should be doing in this case. << Is there an easier way to get access to local database using only it's folder path? >> Nope, that's the process. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, May 5 2007 11:37 AM | Permanent Link |
"Royke" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:B4E0E236-08C6-4008-8DDB-ED20BCFF7C77@news.elevatesoft.com... > Michael, > > << No, I'm aware of how to create a database if I want a new one. What I'm > trying to do is to convert my OpenDatabase dialog, where a user > can select whatever database they need - either local or remote. >> > > It's the same process. Just use CREATE DATABASE to make sure that there > is a name -> path connection in the configuration file for the database. > > << I'm currently querying config to see if the database with this path > already present and if not, create a new database with GUID (random) name > and the path required. It is my understanding that creating a database > (CREATE DATABASE statement) does not erase data in the select folder if it > already has a database. >> > > That is correct, and you are doing what you should be doing in this case. > > << Is there an easier way to get access to local database using only it's > folder path? >> > > Nope, that's the process. > > -- > Tim Young > Elevate Software > www.elevatesoft.com I was wondeing why this can only be done in such a primitive way. Would it be that difficult to add some method to change the path of an existing TEDBDatabase? I tried to access the catalog (databases database) directly (which is easy), but editing it gives a read-only warning. Is there an easy way around this? Roy |
Sun, May 6 2007 8:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
I think you're suffering from DBISAMitis, I know I am. Just think of CREATE DATABASE and DROP DATABASE as changing the path name. The important bit, as far as I can see, is the EDBDatabase.EDBCat which resides in with the data files, and that can be accessed from as many databases as you want. Roy Lambert |
Mon, May 7 2007 4:59 AM | Permanent Link |
"Harry de Boer" | "DBISAMitis"
So that's what I am suffering from. Guess there are a lot of nastier 'diseases' to suffer from Glad there's a vaccin for it: EDB. Regards, Harry "Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht news:2A90CC5B-E336-4334-87CA-E00627DE731C@news.elevatesoft.com... > Royke > > > I think you're suffering from DBISAMitis, I know I am. Just think of CREATE DATABASE and DROP DATABASE as changing the path name. The important bit, as far as I can see, is the EDBDatabase.EDBCat which resides in with the data files, and that can be accessed from as many databases as you want. > > Roy Lambert > |
Mon, May 7 2007 2:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Royke,
<< I was wondeing why this can only be done in such a primitive way. Would it be that difficult to add some method to change the path of an existing TEDBDatabase? >> How often are you moving around databases ? In most installations, it should be a one-shot deal. << I tried to access the catalog (databases database) directly (which is easy), but editing it gives a read-only warning. Is there an easy way around this? >> You can't edit the configuration or catalog directly. You must use the DDL statements to affect both. If you look in this section of the manual, under each configuration or catalog table you will see which DDL statements are used to affect the table: http://www.elevatesoft.com/edb1sql_system%20information.htm -- Tim Young Elevate Software www.elevatesoft.com |
Sun, May 20 2007 12:38 PM | Permanent Link |
Dale Barnes | Roy Lambert <roy.lambert@skynet.co.uk> wrote:
Royke I think you're suffering from DBISAMitis, I know I am. Just think of CREATE DATABASE and DROP DATABASE as changing the path name. The important bit, as far as I can see, is the EDBDatabase.EDBCat which resides in with the data files, and that can be accessed from as many databases as you want. Roy Lambert I suffer simply from being too old to change! I have been trying to come to terms with using ElevateDB but I find myself going to back to DBISAM due to how simple it is to use. The config files and paths seem to be driving me a bit crazy here. Question about the config files. If you are using the CS version, the client on the desktop does not have to have a common path to the config file correct since it is handled at the server side? |
Mon, May 21 2007 3:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Dale
>I suffer simply from being too old to change! At 56 I know THAT feeling >I have been trying to come to terms with using ElevateDB but I find myself going to back to DBISAM due to how simple it is to use. Hmmmm I've found myself more than once thinking "is this worth it". One of the things that makes me keep on is the improved speed for full text indexing, but I also feel that DBISAM was nice and easy, ElevateDB is hard work. I'm hoping that as I get more used to it (and ignore chunks of it) it'll get easier. >The config files and paths >seem to be driving me a bit crazy here. The part that drives me mad is that I can't access a table in EDBMan at the same time as in the app because its two different configuration files. >Question about the config files. If you are using the CS version, the client on the desktop does not have to have a common path to the config file correct since it is handled at the server side? Since I use fileserver I don't really know but I would guess you're right. Roy Lambert |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |