Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 3 of 3 total |
RemObjects Oxygene |
Tue, Feb 7 2012 2:53 AM | Permanent Link |
Mark Bestland | I am testing Prism, using the Oxygene command line compiler from RemObjects (it's free). I'm using it since my Delpi Rad Studio 10 is Delphi Only. Prism is Object Pascal, but it has a few differences, so for now I'm testing using just the command line compiler. .Net libraries work well enough from most vendors, and I would like to test the ElevateDB .Net libraries, so ....
Could you list a programmatic example of building up a connection to a server using code ? And maybe creating a simple table if you have time. A delphi example will be just fine. I've installed the DAC, and I'm running the 32bit unicode server. I am an old VCL hand, sorry !!! Thank you. |
Tue, Feb 7 2012 11:22 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mark,
<< I am testing Prism, using the Oxygene command line compiler from RemObjects (it's free). I'm using it since my Delpi Rad Studio 10 is Delphi Only. Prism is Object Pascal, but it has a few differences, so for now I'm testing using just the command line compiler. .Net libraries work well enough from most vendors, and I would like to test the ElevateDB .Net libraries, so .... Could you list a programmatic example of building up a connection to a server using code ? And maybe creating a simple table if you have time. A delphi example will be just fine. >> The only thing different with the EDB data provider, over any other data provider, is the connection string. Therefore, any XXXConnection, XXXCommand example for Prism will work fine with EDB by just replacing the XXX with EDB. I don't have a Delphi example of the .NET data provider handy, but here is how you would do it in C#: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Elevate.ElevateDB.Data; namespace ElevateDBCreateTable { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { EDBConnection DataConnection = new EDBConnection(@"TYPE=LOCAL;CONFIGPATH=C:\Unicode;DATABASE=ADOUnicodeTest;UID=Administrator;PWD=EDBDefault"); DataConnection.Open(); EDBCommand DataCommand = new EDBCommand(); DataCommand.Connection = DataConnection; DataCommand.CommandText = "CREATE TABLE TestTable (Test INTEGER)"; DataCommand.ExecuteNonQuery(); } } } Basically, you're looking at just changing {} to begin..end, double-quotes to single-quotes, and = assignments to := assignments (apart from the auto-generated event handler code, etc.). -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Feb 14 2012 5:18 PM | Permanent Link |
Mark Bestland | Tim thank you so much.
I use the c# command line compiler also. |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |