views:

355

answers:

1

I've created a new SQL 2008 database project in Visual Studio 2010 and filled it with the contents of a local SQL Express database. When I try to build the database project I get this error: SQL03006: Column: [dbo].[table1].[geog] has an unresolved reference to Sql Type [dbo].[geography]

I've done some searching and it may be missing a reference to Microsoft.SqlTypes.dbschema, but I can't find that anywhere: http://www.incyclesoftware.com/blog/post/2009/07/07/Resolve-references-Error-TSD03006-IN-VSTS-DB-GDR.aspx

Is the datatype really not supported out of the box or am I missing something?

+2  A: 

Found it; in the table or stored procedure the datatype needs to be prefixed with [sys] like this:

CREATE TABLE [dbo].[Location] (
    [objectId]  BIGINT            NOT NULL,
    [latitude]  FLOAT             NOT NULL,
    [longitude] FLOAT             NOT NULL,
    [geog]      [sys].[geography] NULL,
    [geom]      [sys].[geometry]  NULL
);
Mathieu Diepman

related questions