I forgot to post the error message:
------ 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).
On Apr 10, 5:02 pm, ethan <[email protected]> wrote:
> Total Noob. I am following the posted getting started guide. I am at
> the point where I test the schema generation. Here is my 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>
>
> And here is the tester:
>
> Imports MyAssembly.Domain
> Imports NHibernate.Cfg
> Imports NHibernate.Tool.hbm2ddl
> Imports NUnit.Framework
>
> Namespace Tests
>
> <TestFixture()> _
> Public Class GenerateSchema_Fixture
>
> <Test()> _
> Public Sub Can_generate_schema()
>
> Dim cfg = New Configuration()
> cfg.Configure()
> cfg.AddAssembly(GetType(Question).Assembly)
> Dim exp As NHibernate.Tool.hbm2ddl.SchemaExport = New
> NHibernate.Tool.hbm2ddl.SchemaExport(cfg)
> exp.Execute(True, True, False)
>
> End Sub
>
> End Class
>
> End Namespace
--
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.