Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
.Net and creating a new database |
Thu, Feb 25 2016 11:05 AM | Permanent Link |
Matthew Jones | Okay, assume I have a .Net application written with C#. I have the .Net
interface thingy. The .Net application is just starting up, and decides it wants to create a new Session, and within that Session a new database and some new tables in that. The location of each of those is unknown at compile time. Is that all possible? There would be no EDB Manager installed to assist, it has to do everything from scratch. -- Matthew Jones |
Thu, Feb 25 2016 2:33 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< Okay, assume I have a .Net application written with C#. I have the .Net interface thingy. The .Net application is just starting up, and decides it wants to create a new Session, and within that Session a new database and some new tables in that. The location of each of those is unknown at compile time. Is that all possible? There would be no EDB Manager installed to assist, it has to do everything from scratch. >> Sure, you would do it just like you would in Delphi. For example, the following code will create a database on the fly: private void button1_Click(object sender, EventArgs e) { EDBConnection DataConnection = new EDBConnection(@"NAME=Test;DESCRIPTION=Test Connection;TYPE=LOCAL;CONFIGPATH=C:\MyApp;DATABASE=Configuration;UID=Administrator;PWD=EDBDefault"); DataConnection.Open(); EDBCommand DataCommand = new EDBCommand(); DataCommand.Connection = DataConnection; // Create the database DataCommand.CommandText = @"CREATE DATABASE MyDatabase PATH 'c:\myapp\mydata'"; DataCommand.ExecuteNonQuery(); DataConnection.ChangeDatabase("MyDatabase"); DataConnection.Close(); } Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 26 2016 3:55 AM | Permanent Link |
Matthew Jones | Tim Young [Elevate Software] wrote:
> Sure, you would do it just like you would in Delphi. For example, > the following code will create a database on the fly: Many thanks. -- Matthew Jones |
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 |