I am following the 'Your First NHibernate Based Application" and
getting this error when I try to run the first test on the
configuration file:
------ Test started: Assembly: ECEHire.Test.dll ------
Test 'ECEHire.Test.Tests.GenerateSchema_Fixture.Can_generate_schema'
failed: NHibernate.HibernateException : Format of the initialization
string does not conform to specification starting at index 49.
----> System.ArgumentException : Format of the initialization string
does not conform to specification starting at index 49.
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Action`1
scriptAction, Boolean export, Boolean justDrop)
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script,
Boolean export, Boolean justDrop)
GenerateSchema_Fixture.vb(18,0): at
ECEHire.Test.Tests.GenerateSchema_Fixture.Can_generate_schema()
--ArgumentException
at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String
connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
useOdbcRules, String& keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable
parsetable, String connectionString, Boolean buildChain, Hashtable
synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String
connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(String
connectionString)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String
connectionString, DbConnectionOptions previous)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String
connectionString, DbConnectionPoolGroupOptions poolOptions,
DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String
value)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String
value)
at NHibernate.Connection.DriverConnectionProvider.GetConnection()
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Action`1
scriptAction, Boolean export, Boolean justDrop)
0 passed, 1 failed, 0 skipped, took 3.39 seconds (NUnit 2.5.10).
Here is the configuration file:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property
name="connection.provider">NHibernate.Connection.DriverConnectionProvider</
property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</
property>
<property
name="connection.driver_class">NHibernate.Driver.SqlClientDriver</
property>
<property name="connection.connection_string">Data
Source=SqlServerName;Initial Catalog=DatabaseName;Integrated
Security=True;</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.