Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread .Net Adapter Connection String
Mon, Jun 16 2008 8:16 PMPermanent Link

Alan Questell
I'm switching from the ODBC driving (VS 2008 and EDB 2.0, DAC 2.0) to
the Net Adapter and I can't find anything documenting the correct way to
build a connection string for the Net adapter.

For example, I want the equivalent to this:

string connStr = "DRIVER={ElevateDB 1 ODBC Driver};TYPE=LOCAL;" +

"CONFIGPATH=G:\\Data;Database=BBRolls;UID=DBUser;PWD=dbadmin";

I supposedly have the adapter installed, but I can't get a connection
string that will work.

Thanks for any guidance.
Tue, Jun 17 2008 7:03 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Alan,

You need to include the "elevate.elevatedb.data.dll" in your project
references and then you can use the ConnectionStringBuilder like this:

 try
 {
  Elevate.ElevateDB.Data.EDBConnectionStringBuilder             
ConnectionStringBuilder = new
Elevate.ElevateDB.Data.EDBConnectionStringBuilder();
                ConnectionStringBuilder.Type = "LOCAL";
                ConnectionStringBuilder.ConfigPath = @"D:\Temp";
                ConnectionStringBuilder.Database = "Test";
                ConnectionStringBuilder.UID = "Administrator";
                ConnectionStringBuilder.PWD = "password";

                Elevate.ElevateDB.Data.EDBConnection Connection = new
Elevate.ElevateDB.Data.EDBConnection(ConnectionStringBuilder.ConnectionString);
                Connection.Open();

                Elevate.ElevateDB.Data.EDBCommand TestCommand = new
Elevate.ElevateDB.Data.EDBCommand("", Connection);
                TestCommand.CommandText = "SELECT * FROM Fred";

                Elevate.ElevateDB.Data.EDBDataAdapter TestDA = new
Elevate.ElevateDB.Data.EDBDataAdapter(TestCommand);
                DataSet TestDS = new DataSet();

                TestDA.Fill(TestDS, "Fred");
                DataTable TestTable = TestDS.Tables["Fred"];

                Grid.DataSource = TestTable;

                Connection.Close();
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

I will upload a small sample project for VS2008 in the binaries for you.

Note that I have changed the password for the Administrator because I
could not find the default password value anywhere.

Chris Holland
[Team Elevate]


Alan Questell wrote:
> I'm switching from the ODBC driving (VS 2008 and EDB 2.0, DAC 2.0) to
> the Net Adapter and I can't find anything documenting the correct way to
> build a connection string for the Net adapter.
>
> For example, I want the equivalent to this:
>
> string connStr = "DRIVER={ElevateDB 1 ODBC Driver};TYPE=LOCAL;" +
> "CONFIGPATH=G:\\Data;Database=BBRolls;UID=DBUser;PWD=dbadmin";
>
> I supposedly have the adapter installed, but I can't get a connection
> string that will work.
>
> Thanks for any guidance.
Tue, Jun 17 2008 8:47 AMPermanent Link

"Alan Questell"
Thanks a lot!

That's what I needed to know!

I found that reference and was (trying) to use the connection string builder
after I posted, but it was this part:

Elevate.ElevateDB.Data.EDBConnection Connection = new
Elevate.ElevateDB.Data.EDBConnection(ConnectionStringBuilder.ConnectionString);

that I could find nothing about.

Thanks again!



"Chris Holland [Team Elevate]" <mail@chrisholland.me.uk> wrote in message
news:BB12F3F5-6F83-463F-827E-E959254A8D94@news.elevatesoft.com...
> Hi Alan,
>
> You need to include the "elevate.elevatedb.data.dll" in your project
> references and then you can use the ConnectionStringBuilder like this:
>
>  try
>  {
>   Elevate.ElevateDB.Data.EDBConnectionStringBuilder
> ConnectionStringBuilder = new
> Elevate.ElevateDB.Data.EDBConnectionStringBuilder();
>                 ConnectionStringBuilder.Type = "LOCAL";
>                 ConnectionStringBuilder.ConfigPath = @"D:\Temp";
>                 ConnectionStringBuilder.Database = "Test";
>                 ConnectionStringBuilder.UID = "Administrator";
>                 ConnectionStringBuilder.PWD = "password";
>
>                 Elevate.ElevateDB.Data.EDBConnection Connection = new
> Elevate.ElevateDB.Data.EDBConnection(ConnectionStringBuilder.ConnectionString);
>                 Connection.Open();
>
>                 Elevate.ElevateDB.Data.EDBCommand TestCommand = new
> Elevate.ElevateDB.Data.EDBCommand("", Connection);
>                 TestCommand.CommandText = "SELECT * FROM Fred";
>
>                 Elevate.ElevateDB.Data.EDBDataAdapter TestDA = new
> Elevate.ElevateDB.Data.EDBDataAdapter(TestCommand);
>                 DataSet TestDS = new DataSet();
>
>                 TestDA.Fill(TestDS, "Fred");
>                 DataTable TestTable = TestDS.Tables["Fred"];
>
>                 Grid.DataSource = TestTable;
>
>                 Connection.Close();
>             }
>             catch (Exception ee)
>             {
>                 MessageBox.Show(ee.Message, "Error", MessageBoxButtons.OK,
> MessageBoxIcon.Error);
>             }
>
> I will upload a small sample project for VS2008 in the binaries for you.
>
> Note that I have changed the password for the Administrator because I
> could not find the default password value anywhere.
>
> Chris Holland
> [Team Elevate]
>
>
> Alan Questell wrote:
>> I'm switching from the ODBC driving (VS 2008 and EDB 2.0, DAC 2.0) to the
>> Net Adapter and I can't find anything documenting the correct way to
>> build a connection string for the Net adapter.
>>
>> For example, I want the equivalent to this:
>>
>> string connStr = "DRIVER={ElevateDB 1 ODBC Driver};TYPE=LOCAL;" +
>> "CONFIGPATH=G:\\Data;Database=BBRolls;UID=DBUser;PWD=dbadmin";
>>
>> I supposedly have the adapter installed, but I can't get a connection
>> string that will work.
>>
>> Thanks for any guidance.

Tue, Jun 17 2008 9:18 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< Note that I have changed the password for the Administrator because I
could not find the default password value anywhere. >>

'EDBDefault' (case-sensitive)

Thanks for the sample. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Jun 17 2008 9:54 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Tim,

I had to reload all of my data including ElevateDB due to a hard disk
corruption. Last time I loaded it I found the default password and
changed it no problem. This time I just could not find it!

I even disk a find on the help files for "password" but nothing was
forthcoming, very strange.

Chris

Tim Young [Elevate Software] wrote:
> Chris,
>
> << Note that I have changed the password for the Administrator because I
> could not find the default password value anywhere. >>
>
> 'EDBDefault' (case-sensitive)
>
> Thanks for the sample. Smiley
>
Wed, Jun 18 2008 4:17 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

There is a new example in the binaries group that demonstrates changing
the path to the data

Chris Holland
[Team Elevate]


Chris Holland [Team Elevate] wrote:
> Hi Tim,
>
> I had to reload all of my data including ElevateDB due to a hard disk
> corruption. Last time I loaded it I found the default password and
> changed it no problem. This time I just could not find it!
>
> I even disk a find on the help files for "password" but nothing was
> forthcoming, very strange.
>
> Chris
>
> Tim Young [Elevate Software] wrote:
>> Chris,
>>
>> << Note that I have changed the password for the Administrator because
>> I could not find the default password value anywhere. >>
>>
>> 'EDBDefault' (case-sensitive)
>>
>> Thanks for the sample. Smiley
>>
Wed, Jun 18 2008 6:46 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< I had to reload all of my data including ElevateDB due to a hard disk
corruption. Last time I loaded it I found the default password and changed
it no problem. This time I just could not find it! >>

For future reference, you can always find it here in the User Security topic
in the SQL Manual:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=0&topic=8

--
Tim Young
Elevate Software
www.elevatesoft.com

Image