Yep, I've used alias's before, but thanx much for the site. I can use all the help I can get! <g>
from Robert Meek dba Tangentals Design CCopyright 2006 Proud to be a moderator of "The Delphi Lists" at elists.org (["An unused program is the consequence of a higher logic!", nil]) As written in The Compendium of Accepted Robotic and Surrlogic Theorems Used in the Self Analysis of Elemental Positronic Pathways...1st Edition Revised -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sent: Thursday, January 25, 2007 8:59 AM To: Moderated discussion list about database programming with Borland's Delphi Subject: Re: To Helen or any Firebird pros Hello Robert, For your database-name, you could also use an alias. With an alias, it doesn't matter where you put your database, as long as it's in the alias-file, it will be found by Firebird-server This also give you more security over your database and network, since the physical structure isn't exposed in that way. You can find the aliases-file in the Firebird-folder, under "aliases.conf". Just put in the name you want it to be know to the outside-world, and it's internal path (it still must be a path on the server itself, not a share), and in you connection you refer to that aliasname instead of the physical path So in Cosmin's example, when you name your alias "MyOutsideWorldDatabase" for C:\TechDB\TechDB.FDB, it would read: CNB.Database := 'MyOutsideWorldDatabase'; If it's a remote server, just put the IP-address and a semicolon : in front of it. For more information on Firebird, take a look at http://www.destructor.de/firebird. They give a lot of info about Error-codes, Build-in Administration tools (GFIX, GSEC, GBAK, ISQL, etc.), Server and Client-installs, etc. Cosmin Prund wrote: >Hello Robert, here's what I found about Firebird the last two days: > >As you might have noticed I've started working on a ASP.NET application >using Delphi and I obviously wanted to use my favorite database, >Firebird. First of all there's not much info on Firebird + ADO.NET >provider + Delphi.NET, but there's a good raison for that: Firebird's >ADO.NET is, well, an ADO.NET provider! It works like any other ADO.NET >provider and there isn't much specific info to say about it. For the >parts that are specific to Firebird, make sure you take a look at the >SDK / CHM documentation that got installed on your system when you >installed the ADO.NET provider. > >Moving on, I noticed you're taking the hard road building the connection >string. The FbConnectionStringBuilder has properties for every single >parameter, you don't need to add them as text. If you add them as text >and you miss-spell something you'll be in trouble, the engine might miss >them. > > CNB := FbConnectionStringBuilder.Create; > CNB.UserID := 'SYSDBA'; > CNB.Password := 'masterkey'; // default password > CNB.Database := 'C:\TechDB\TechDB.FDB'; // Database path > CNB.Port := 3050; // This is the default > CNB.Pooling := True; // Smart for ASP.NET > CNB.ServerType := 1; // This has to be 1 for embeded > > // Start the connection > FConnection := FbConnection.Create(CNB.ToString); > >Since you ran into trouble starting the application because of the not >found DLL, here's something about that DLL and it's history (I suspect >there's an bad error message). Your application is complaining about the >thing that's called "the client library". Historically this was called >GDS32.DLL (back in the days when Firebird was actually Interbase). When >the switch was made to Firebird, they changed the name of the default >client library to "FBCLIENT.DLL". This "new" client library exposes >almost the same interface as GDS32 and, in fact, changing it's name to >GDS32.DLL will keep older applications happy. When they shipped the >Embedded version of Firebird they shipped the library with yet an other >name, and the developer is supposed to change it's name to whatever's >required. This is documented in the "readme_embeded.txt" file in the >"doc" subfolder of the embeded installation. My guess is that you'll >need to change it's name to "fbclient.dll", those I haven't tried it, I >haven't used the embeded version of Firebird with NET. > >Further on, you should install the FULL version of Firebird on your >development machine. This is not really required but it makes debugging >easy: The Embeded version of Firebird only allows one application >access to the database at any given time (that's why it's embeded, it >has no inter-process communication capabilities), and this makes things >a bit difficult. Ex: if you keep a connection to the database opened >from the Delphi IDE and you hit Run to start the application, the >application will complain about not being able to connected to the >database as the database is opened by a different application. Besides, >when I'm working on a database application I always keep a DB Management >application opened and connected to the Database. This gives me the >ability to quickly test a SQL query in a better / more forgiving >environment and gives me the ability to change stuff around. > >And yes, about the DB Management application, please install IBExpert >Personal Edition. It's about a million times better then IBConsole so it >really helps a lot! You'll find it at www.ibexpert.com. You'll need to >fight the interface a bit (as they're running an "odd" experiment with >the Personal Edition download page) but keep going, it will eventually >work. Note: use Internet Explorer. I wasn't able to get it working with >Opera. > >If you need an introduction to SQL and Interbase/Firebird, take a look >here: >http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_documentati on >Most documentation is about Interbase 6.0, but it all works with >Firebird 2.0 as well. And please note, you don't really need to use the >"isql" tool to run the sample codes in that document. IBExpert works >just fine. I personally prefer a GUI for whatever. I'm a Windows >programmer after all... > >P.S: Fell free to mail me directly if the list moving too slow. > >Robert Meek wrote: > > >> It took more than a lot of searching, but finally after combining >>and extrapolating the code I found on 4 different sites, I finally came up >>with what I believe is a proper start to using Firebird in an embedded >>application. Here it is in Pascal NET code, ( the types and vars are >>elsewhere): >> >>MyFBConnectionString := new FbConnectionStringBuilder(); >> MyFBConnectionString.Add('ServerType', 1); >> MyFBConnectionString.Add('User', 'SYSDBA'); >> MyFBConnectionString.Add('Pooling', False); >> MyFBConnectionString.Add('Password', 'masterkey'); >> MyFBConnectionString.Add('Dialect', 3); >> MyFBConnectionString.Add('Database', DataStoreFile); >> MyFbConnection := new FbConnection(); >> MyFbConnection.CreateDatabase(MyFBConnectionString.ToString); >> >> At least this seems to compile! Unfortunately however, I am now >>getting an error message when I attempt to run it thru the debugger saying >>that it cannot find the fbembed.dll, which is located not only where it was >>originally installed, but also in the application's exe directory! So the >>only thing I can think of is that I'm still missing something in my >>connection string. Does anyone know how to get past this? >> Also, it's hard for me, coming from a strict Delphi background, to >>believe how difficult it seems to be to get decent info on using Firebird! >>I've asked everywhere including here before, and all I get are cryptic >>replies like google it or your connection string is wrong! The docs have >>absolutely no information to help a beginner start using it, and even the >>code above, which is an extrapolation of googled code I can't say for sure >>will work because it matches nothing I found anywhere! Nothing I found >>would compile! This makes it very improbable that I would waste any money >>of a Firebird book because if the internet docs and the docs that come with >>the installation are this bad I'd be afraid of what I'd find in a real book! >> I'm not trying to be a smartass. I'm really frustrated by the lack >>of honest help and documentation that I've always depended upon with Delphi. >>One guy replied to my query on the firebird list privately and told me that >>I didn't know how to read, then proceeded to give me code and instructions >>that had nothing to do with what I had asked! >> So now even IF someone is able to tell me that the above code is >>correct, or help me fix it if it is not, and can tell me how to get the app >>to find the dll it cannot seem to now, I have no idea of what to do next! >>The docs are full of interesting facts about SQL, but nowhere have IO seen >>any instructions that show one how to setup and create tables, fields, give >>them values, indexes, and retrieve data back without SQL! Yet I'm told it >>is possible! Please tell someone who has only worked with dB's via >>components where to find the information I need to make use of what I'm told >>is a great system! >> >>from Robert Meek dba Tangentals Design CCopyright 2006 >>Proud to be a moderator of "The Delphi Lists" at elists.org >> >>(["An unused program is the consequence of a higher logic!", nil]) As >>written in The Compendium of Accepted Robotic and Surrlogic Theorems Used in >>the Self Analysis of Elemental Positronic Pathways...1st Edition Revised >> >> >> >>_______________________________________________ >>Delphi-DB mailing list >>Delphi-DB@elists.org >>http://www.elists.org/mailman/listinfo/delphi-db >> >> >> >> > >_______________________________________________ >Delphi-DB mailing list >Delphi-DB@elists.org >http://www.elists.org/mailman/listinfo/delphi-db > > Paul van Mil Senior Developer MAD-Systems Burg. van Suchtelenstr. 26 6641 XN Beuningen (Gld) The Netherlands Url: www.madsystems.nl Tel.: +31 (0)24-366 1501 Fax.: +31 (0)24-366 1502 Mob.: +31 (0)6 2251 4084 Email: [EMAIL PROTECTED] ************************************************************************* Disclaimer: MAD-Systems is de enige opdrachtnemer van alle werkzaamheden. Nederlands recht is van toepassing. De aansprakelijkheid van MAD-Systems is beperkt tot de uitkering die plaatsvindt onder de verzekering van MAD-Systems tegen beroepsaansprakelijkheid. Disclaimer: MAD-Systems is the exclusive contractual party with respect to all work and services undertaken. Dutch laws shall apply. The aggregate liability of MAD-Systems shall be limited to the proceeds available under MAD-Systems professional liability insurance. This e-mail message is intended exclusively for the addressee(s). If the e-mail was sent to you by mistake, would you please contact us immediately by e-mail through "[EMAIL PROTECTED]". In that case, we also request that you destroy the e-mail and that you neither use the contents nor disclose them in any manner to third parties, because the message may contain confidential information which is protected by professional secrecy. Any addressee should be aware that internet e-mail is subject to risks; MAD-Systems therefore denies any responsibility for damages resulting from the use of Internet e-mail. ************************************************************************* This email is checked on virusses through Norton Antivirus, updated 2007-01-24 _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://www.elists.org/mailman/listinfo/delphi-db _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://www.elists.org/mailman/listinfo/delphi-db