Monday, January 13, 2014

ADO.NET ConnectionString for Rocket Universe database


If you have not been keeping up with the latest developments in .NET in regards to Rocket Universe development, you may not know that Rocket has developed libraries that now support use of ADO.NET as well as Entity Framework!

You can download the latest .NET libraries that are part of the U2 Client from here:

However, once you download and install the latest .NET Client, you will notice that none of the code samples demonstrate how to use a connectionString in the App.config or Web.config file!  Instead, the samples simply use the U2ConnectionStringBuilder to build a connection string manually in the code file.

Fortunately, you can readily deduce the required structure for the App.config or Web.config file from this code sample which results in the following connection string format:

<connectionStrings><add name="(Connection String Name)" connectionString="Server=(Server Name);Database=(Database Name);UID=(Windows user ID);Pwd=(Windows Password);ServerType=UNIVERSE;Pooling=false;" providerName="U2.Data.Client" /></connectionStrings>

A sample of the connection string looks like this:

<add name="UNIVERSEConn" connectionString="Server=localhost;Database=HS.SALES;UID=MyUser;Pwd=MyPassword;ServerType=UNIVERSE;Pooling=false;" providerName="U2.Data.Client"/>

No comments:

Post a Comment