Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 29th, 2004, 05:23 PM
Jaybirdbsu Jaybirdbsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Jaybirdbsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Create database with embedded version in .NET

Hello all,
I am just starting to look at Firebird and I want to use the embedded version in .NET. My question is how do I create a database to start with. Is there some command in the .NET provider to do this? It didn't look like any utilities are included with the embedded version. Any help will be appreciated.

Thanks

Jay

Reply With Quote
  #2  
Old June 30th, 2004, 03:50 AM
WayneB WayneB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Cape Town, South Africa
Posts: 51 WayneB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 42 m 31 sec
Reputation Power: 5
Send a message via Skype to WayneB
Smile

Hi

Embedded refers to the driver being embedded into your application.

The Database is still external. To create a Database you need to type DDL statements (like Create Database Bla bla bla...) into the ISQL command window that is suppled with Firebird - look in Bin Dir.

You should be able to pass DDL statements through the provider as it is almost like normal SQL - but i am not to sure that you can create databases with it, as the provider connects to an existing database.

For an easier approuch try usinging a tool like IBAdmin or IBExpert. IBExpert has a personal edition that you can download for free.

When looking for Firebird tools remember to include Interbase in your search.

Reply With Quote
  #3  
Old June 30th, 2004, 09:30 AM
Jaybirdbsu Jaybirdbsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Jaybirdbsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

WayneB,
Thanks for the reply. I had tried using ISQL and GSEC and I just kept on getting an errors about "unavailable database" and "unable to open database". In ISQL I was getting -904 when I tried to create the database. I finally downloaded firebird on another box and gsec and isql worked fine there. It ended up that I uninstalled MSDE and then it all started to work fine. I even re-installed MSDE and gsec and isql are still running fine. I have no idea why it was having a problem but it seems great now. I managed to create my database and I was able to access it via .NET and the embedded engine. Looks like I asked a question just a little to quick. Thanks again for the reply.

Jay

Reply With Quote
  #4  
Old July 1st, 2004, 04:07 PM
carlosga carlosga is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 13 carlosga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Jaybirdbsu
Hello all,
I am just starting to look at Firebird and I want to use the embedded version in .NET. My question is how do I create a database to start with. Is there some command in the .NET provider to do this? It didn't look like any utilities are included with the embedded version. Any help will be appreciated.

Thanks

Jay


Review FbConnection.CreateDatabase method.

Reply With Quote
  #5  
Old July 14th, 2004, 11:34 AM
Jaybirdbsu Jaybirdbsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Jaybirdbsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Thanks carlosga

I did get it to work with the .CreateDatabase method. I was getting hung up on what to pass in the hash table. So I just downloaded the source and looked up the CreateDatabase method implementation to see what to pass. Once I had that, it worked perfect.

Thanks Again

Jay

Reply With Quote
  #6  
Old August 11th, 2004, 01:23 PM
RX_coder RX_coder is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 RX_coder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by Jaybirdbsu
I did get it to work with the .CreateDatabase method. I was getting hung up on what to pass in the hash table. So I just downloaded the source and looked up the CreateDatabase method implementation to see what to pass. Once I had that, it worked perfect.

Thanks Again

Jay

Jaybirdbsu, could you please post a code example?

Reply With Quote
  #7  
Old August 31st, 2004, 02:14 PM
DummieBoy DummieBoy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 DummieBoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Jaybirdbsu
Hello all,
I am just starting to look at Firebird and I want to use the embedded version in .NET. My question is how do I create a database to start with. Is there some command in the .NET provider to do this? It didn't look like any utilities are included with the embedded version. Any help will be appreciated.

Thanks

Jay


Hi there, if you want to create the database within your app take a look at this example.

Code:
...
using FirebirdSql.Data.Firebird;
...

string dbFile = AppDomain.CurrentDomain.BaseDirectory + "data/coats.gdb";

Hashtable creationParametes = new Hashtable();

creationParametes.Add("ServerType", "1");
creationParametes.Add("User", "coatsUser");
creationParametes.Add("Password", "coatsUser.x");
creationParametes.Add("Database", dbFile);

FbConnection.CreateDatabase( creationParametes );

Reply With Quote
  #8  
Old January 17th, 2005, 03:28 PM
dotnetfirebird dotnetfirebird is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 dotnetfirebird User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 28 sec
Reputation Power: 0

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Create database with embedded version in .NET


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT