Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Connectivity » View Thread |
Messages 1 to 9 of 9 total |
EDBConnection.Open |
Wed, Jun 25 2008 12:09 PM | Permanent Link |
David Loving | It's my first attempt at accessing an ElevateDB 2.0 Build 2 trial version database with MS VS 2008.
I created the sample database using the ElevateDB Manager and have no problem viewing the data with it. I am using the EDBConnectionStringBuilder to build my connection string with a local type, a config path and the database name. When I try to connect to the database in my C# application (EDBConnection.Open), I get the following error... ArgumentNullException Value cannot be null. Parameter Name: ptr Any ideas? |
Wed, Jun 25 2008 1:07 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< It's my first attempt at accessing an ElevateDB 2.0 Build 2 trial version database with MS VS 2008. I created the sample database using the ElevateDB Manager and have no problem viewing the data with it. I am using the EDBConnectionStringBuilder to build my connection string with a local type, a config path and the database name. When I try to connect to the database in my C# application (EDBConnection.Open), I get the following error... ArgumentNullException Value cannot be null. Parameter Name: ptr >> Could you send me the code that you're using ? (Just the code is fine, I don't need the whole project). Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs. Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 1:50 PM | Permanent Link |
David Loving | I have this in a standard windows forms application in the Form1.cs file...
using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Elevate.ElevateDB.Data; namespace TestElevateDB { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { EDBConnectionStringBuilder csb = new EDBConnectionStringBuilder(); csb.Type = "LOCAL"; csb.ConfigPath = @"C:\Users\David\Documents\ElevateData"; csb.Database = "PetraShare"; EDBConnection conn = new EDBConnection(csb.ConnectionString); try { conn.Open(); textBox1.AppendText("Connection Open!"); } finally { conn.Close(); conn.Dispose(); } } } } "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: David, << It's my first attempt at accessing an ElevateDB 2.0 Build 2 trial version database with MS VS 2008. I created the sample database using the ElevateDB Manager and have no problem viewing the data with it. I am using the EDBConnectionStringBuilder to build my connection string with a local type, a config path and the database name. When I try to connect to the database in my C# application (EDBConnection.Open), I get the following error... ArgumentNullException Value cannot be null. Parameter Name: ptr >> Could you send me the code that you're using ? (Just the code is fine, I don't need the whole project). Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs. Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 1:57 PM | Permanent Link |
David Loving | Yes... I have edbmigratedbisam3.dll in the config folder. I used it to migrate a DBISAM 3.31 set of tables to ElevateDB 2.0 B2.
I have no other dlls or files other than EDBConfig.EDBcfg, .EDBlck and .EDBlog in the config folder. I have a sub folder of that folder containing the migrated database tables. David L. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: David, << It's my first attempt at accessing an ElevateDB 2.0 Build 2 trial version database with MS VS 2008. I created the sample database using the ElevateDB Manager and have no problem viewing the data with it. I am using the EDBConnectionStringBuilder to build my connection string with a local type, a config path and the database name. When I try to connect to the database in my C# application (EDBConnection.Open), I get the following error... ArgumentNullException Value cannot be null. Parameter Name: ptr >> Could you send me the code that you're using ? (Just the code is fine, I don't need the whole project). Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs. Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 2:03 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< I have this in a standard windows forms application in the Form1.cs file... >> Yeah, that works fine here, so back to this question: "Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs." -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 2:15 PM | Permanent Link |
David Loving | Yes... I had edbmigratedbisam3.dll in the config folder. I used it to migrate a DBISAM 3.31 set of tables to ElevateDB 2.0 B2.
I removed the dll and now get this... ElevateDB Error #100 There is an error in the metadata for the configuration EDBConfig (Signature, password, character set (ANSI/Unicode), or version number mismatch) David L. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: David, << I have this in a standard windows forms application in the Form1.cs file... >> Yeah, that works fine here, so back to this question: "Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs." -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 2:23 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< ElevateDB Error #100 There is an error in the metadata for the configuration EDBConfig (Signature, password, character set (ANSI/Unicode), or version number mismatch) >> Are you sure that you're running the 2.0 .NET data provider ? You can test this by trying to set up a session in the 2.0 Unicode EDB Manager that uses the same configuration path as your C# application. If it works in the 2.0 EDB Manager, then you're still using the 1.x .NET data provider. Also, what does your machine.config (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG) have in it for these entries: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Elevate.ElevateDB.Data" publicKeyToken="cf9bc1202c75e9e2"/> <codeBase version="2.0.2.0" href="file:///m:\products\source\edb2\edbprovider\Elevate.ElevateDB.Data.dll"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Elevate.ElevateDB.VisualStudio" publicKeyToken="009e2f3c00f33fa3"/> <codeBase version="2.0.2.0" href="file:///m:\products\source\edb2\edbprovidervs\Elevate.ElevateDB.VisualStudio.dll"/> </dependentAssembly> </assemblyBinding> </runtime> and here: <system.data> <DbProviderFactories> <add name="ElevateDB Data Provider" invariant="Elevate.ElevateDB.Data" description="ElevateDB 2 .Net 2.0 Data Provider" type="Elevate.ElevateDB.Data.EDBProviderFactory, Elevate.ElevateDB.Data, Version=2.0.2.0, Culture=neutral, PublicKeyToken=cf9bc1202c75e9e2"/> </DbProviderFactories> </system.data> -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 2:25 PM | Permanent Link |
David Loving | I searched on and read about the new error message in other threads...
I deleted my data folder and started all over again. I migrated the data using the Unicode version of ElevateDB Manager and the Unicode migration dll. I removed the Unicode migration dll (to get rid of the error message on connect about the ptr parameter) and the C# application connects correctly now. David L. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: David, << I have this in a standard windows forms application in the Form1.cs file... >> Yeah, that works fine here, so back to this question: "Also, do you have any .DLLs in the configuration path that you're using ? Sometimes this can cause screwy results if they're not valid EDB external modules, but rather assemblies or other types of DLLs." -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 25 2008 3:23 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< I deleted my data folder and started all over again. I migrated the data using the Unicode version of ElevateDB Manager and the Unicode migration dll. I removed the Unicode migration dll (to get rid of the error message on connect about the ptr parameter) and the C# application connects correctly now. >> The migration DLL is a weird one - I'll check this out and make sure that there aren't any issues with normal DLLs residing in the configuration path. As long as they're Unicode, they should be okay for the .NET data provider. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |