tags:

views:

108

answers:

2

I am having issues using NDbUnit with tables that have their own schema - ie:

CREATE TABLE MYSCHEMA.MyTable01
(
    Id int NOT NULL,
    Description varchar(50) NOT NULL
)

Is this a supported scenario? What do I need to do to get this to work?

(working fine when the table is dbo.MyTable01)

A: 

What version of NDbUnit are you using? Earlier releases failed to support explicit schema prefixes but the more recent releases should properly support them.

sbohlen
This *is* supported on databases that properly support schemas. See the SQL Server database that's created in the following script: http://code.google.com/p/ndbunit/source/browse/trunk/NDbUnit.Test/Scripts/sqlserver-testdb-create.sqlThis properly creates a 'second schema' in the DB called [OtherSchema] which the NDbUnit unit tests then run against just fine.Note that the VS DataSet designer doesn't properly add schema prefixes to your dataset -- after dropping tables into it you must then add schema prefixes to the tables in the XSD yourself. After this, NDbUnit DOES support schemas.
sbohlen
A: 

We had the same problem ended up hacking the code to make it support multiple schemas. Seem alot of posts that claims it does support it, howeber suspect people mix them up with the support for prefixes / postfix for diffrent database providers.

qwezy