[fdo-users] FDO 3.4.0 Beta 1 - SQL 2008 - empty schema

miansi AndreiSinelnikov at SierraSystems.com
Tue Feb 17 11:35:57 EST 2009


I have to try your advise. That's maybe it.
Going back to .NET 1.1. world I remember that you was able to create XSD
schema and drop either table or view from the database on it. In case of the
table PK was populated automagically, but for views you had to define them
yourself. I thought that there is a setting somethere, which can do exactly
the same for MGOS schemas.

Anyway, following is example of my view definition

CREATE VIEW [dbo].[vw_Pipe_CatchBasin]
AS
		   SELECT
				  [base].[Id]
				, [CategoryId]
				, [SpatialStatusId]
				, [LifecycleStatusId]
				, [MaterialId]
				, [DisplayId]
				, [SpatialId]
				, [InstallYear]
				, [LocationDescription]
				, [TypeId]
				, [SumpFlag]
				, [GutterFlag]
				, [GutterElevation]
				, [EntrapmentDepth]
				, [InletHeight]
				, [Geo]
			 FROM [dbo].[Asset] [base]
	   INNER JOIN [dbo].[Pipe_CatchBasin] [asset] ON [base].[Id] = [asset].[Id]
		    WHERE [asset].[Geo] IS NOT NULL
GO



Orest Halustchak wrote:
> 
> SQL Server has a number of requirements for setting up this view, it has
> to be a deterministic view and there are a number of settings that have to
> be defined such as SET ANSI_NULLS ON. Also you have to use SCHEMABINDING.
> I was able to set up a view this way and use Map to view the data and
> create new features. In MG, I was able to draw the layer and select the
> feature. My view was a simple view, though.
> 
> Could you post your view definition?
> 
> Thanks,
> Orest.
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of miansi
> Sent: Monday, February 16, 2009 4:07 PM
> To: fdo-users at lists.osgeo.org
> Subject: RE: [fdo-users] FDO 3.4.0 Beta 1 - SQL 2008 - empty schema
> 
> 
> I moved post to FDO forum.
> 
> And yes. I tried indexed views - no luck.
> 
> I was wondering too if it is possible to specify in the layer XML or Map
> XML
> that particular column is primary key.
> 
> Does anyone aware of such method? Can it be done?
> 
> 
> Thank you
> 
> 
> Jason Birch wrote:
>>
>> MapGuide does not allow selection from tables/views without primary keys.
>> Basically, without a primary key there is no way to ensure that you're
>> selecting the correct object.
>>
>> Have you tried setting up an indexed view?  I don't have any experience
>> with this, but...
>> http://msdn.microsoft.com/en-us/library/dd171921.aspx
>>
>> I wonder if there is a way to create a configuratin file for your data
>> source that specifies its schema (including a manual override of the
>> primary key column).  The FDO mailing list may be able to help...
>>
>> Jason
>>
>> ________________________________
>>
>> From: miansi
>> Sent: Mon 2009-02-16 10:23 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: RE: [mapguide-users] FDO 3.4.0 Beta 1 - SQL 2008 - empty schema
>>
>> On the map and inside my application I need to present information joined
>> from both tables. For that I created SQL view and used it.
>>
>> Everything is OK, but I cannot select anything on this layer. I see
>> features
>> on the map, I see mouse pointer changing its shape from ][ to arrow, but
>> neither clicking on feature nor selecting area, which includes multiple
>> features do select features.
>>
>>
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
> 
> --
> View this message in context:
> http://n2.nabble.com/FDO-3.4.0-Beta-1---SQL-2008---empty-schema-tp2322472p2337221.html
> Sent from the FDO Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/FDO-3.4.0-Beta-1---SQL-2008---empty-schema-tp2322472p2341774.html
Sent from the FDO Users mailing list archive at Nabble.com.



More information about the fdo-users mailing list