This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have the following view:
CREATE VIEW [ReportBuilder].[Person] AS SELECT FirstName, MiddleName, LastName, PreferredName, DOB, CountryId, SalutationId, EthnicGroupTypeId, GenderTypeId, IsActive, PrimaryAddressId, TermAddressId, PreferredAddressId, PersonId FROM Community.Person AS Person_1 GO
I've added it to a linked Lightspeed model and then perform a query against it. The following SQL is generated and bombs: A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
SELECT
Msg 208, Level 16, State 1, Line 1 Invalid object name 'ReportBuilder.Person'. If I copy the generated SQL to SQL Management Studio and run it, it fails with the same error. If I change it to the following it works:
SELECT
There seems to be a problem with the way the view name is generated. The square brackets ("[" & "]") are not set correctly by Lightspeed. |
|
|
From your CREATE VIEW statement, ReportBuilder is a schema. It looks like we have a bug when dragging on views that are in a nondefault schema, and I'll try to get this fixed. In the meantime, to work around it, select the entity, go to the Properties window and change the Schema setting to ReportBuilder and the Table Name property to Person (or just delete it if the entity name is Person). The core engine should handle views in nondefault schemas just fine -- the issue is just in the designer inferring the name from the database. Thanks for letting us know about this! |
|
|
You're right. It does appear to be the designer that is not setting Table Name & Schema properties correctly.
Modifying the properties by hand fixed the problem. |
|