This question is locked. New answers and comments are not allowed.
I am experiencing the following error when using Telerik ORM (2010.1 624)
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 57.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, IDictionary driverProps)
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.createRealCon()
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.init()
at OpenAccessRuntime.Relational.RelationalStorageManagerFactory.connect()
at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
I receive this error whenever it calls the IQueryable method for the database class. For instance:
I have read a post in regards to a similar error with the ORM and SQL Azure, however the suggestions in that post have not worked.
Below is a portion of the code from EntityDiagram.cs
Also here is a the code from the App.Config file.
Here is the code from Default.aspx, which is what I am using to call the OpenAccessContext and query the database
This is extremely urgent as I am working on a tight project schedule and I would like to use the ORM. I have tested it with different projects, connecting to local database or one on the server, with a using statement or just creating the context. I have followed the examples to a tee and to no avail. Please help. Thank you!
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 57.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, IDictionary driverProps)
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.createRealCon()
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.init()
at OpenAccessRuntime.Relational.RelationalStorageManagerFactory.connect()
at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
I receive this error whenever it calls the IQueryable method for the database class. For instance:
public
IQueryable<Certification> Certifications
{
get
{
return
this
.GetAll<Certification>();
}
}
I have read a post in regards to a similar error with the ORM and SQL Azure, however the suggestions in that post have not worked.
Below is a portion of the code from EntityDiagram.cs
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using
System;
using
System.Data;
using
System.Linq;
using
System.Linq.Expressions;
using
System.Data.Common;
using
System.Collections.Generic;
using
Telerik.OpenAccess;
using
NERCTest.Data;
using
Telerik.OpenAccess.Metadata;
namespace
NERCTest.Data
{
public
partial
class
NERC_CIP_Context : OpenAccessContext
{
private
static
string
connectionStringName =
"NERC_CIPConnection"
;
private
static
BackendConfiguration backend = GetBackendConfiguration();
private
static
MetadataSource metadataSource = XmlMetadataSource.FromAssemblyResource(
"NERCTestEntityDiagrams.rlinq"
);
public
NERC_CIP_Context()
:
base
(connectionStringName, backend, metadataSource)
{ }
public
NERC_CIP_Context(
string
connection)
:
base
(connection, backend, metadataSource)
{ }
public
NERC_CIP_Context(BackendConfiguration backendConfiguration)
:
base
(connectionStringName, backendConfiguration, metadataSource)
{ }
public
NERC_CIP_Context(
string
connection, MetadataSource metadataSource)
:
base
(connection, backend, metadataSource)
{ }
public
NERC_CIP_Context(
string
connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource)
:
base
(connection, backendConfiguration, metadataSource)
{ }
public
IQueryable<Certification> Certifications
{
get
{
return
this
.GetAll<Certification>();
}
}
public
IQueryable<Contact> Contacts
{
get
{
return
this
.GetAll<Contact>();
}
}
public
static
BackendConfiguration GetBackendConfiguration()
{
BackendConfiguration backend =
new
BackendConfiguration();
backend.Backend =
"mssql"
;
return
backend;
}
}
}
#pragma warning restore 1591
Also here is a the code from the App.Config file.
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
connectionStrings
>
<
add
name
=
"NERC_CIPConnection"
connectionString
=
"data source=.;initial catalog=NERC_CIP;integrated security=True"
providerName
=
"System.Data.SqlClient"
/>
</
connectionStrings
>
</
configuration
>
Here is the code from Default.aspx, which is what I am using to call the OpenAccessContext and query the database
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
NERCTest.Data;
public
partial
class
_Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
using
(NERC_CIP_Context context =
new
NERC_CIP_Context())
{
var query = from c
in
context.Contacts
where c.ContactId == 1
select c;
foreach
(var contact
in
query)
{
Console.WriteLine(
"ContactId: {0}, FirstName: {1}"
, contact.ContactId, contact.FirstName);
}
}
}
}
This is extremely urgent as I am working on a tight project schedule and I would like to use the ORM. I have tested it with different projects, connecting to local database or one on the server, with a using statement or just creating the context. I have followed the examples to a tee and to no avail. Please help. Thank you!