By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,739 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,739 IT Pros & Developers. It's quick & easy.

Restricted Data Type Attribute Violation - hel-lo?

P: n/a
Access 97 SR 2 Front End
SQL Server 7.00.1063 Back End

When I attempt to relink the tables in my Access app. I am suddenly
getting this weird error message = "ODBC--Call Failed", followed by
"[Microsoft][ODBC SQL Server Driver]Restricted Data Type Attribute
Violation(#0)". This problem did not manifest last time I tried a few
weeks ago, and so far as I know there have been no software changes
such as Service Packs etc.

The error occurs when attempting to link a view. Here is the script
for the tables and the view siipl_DoesNotWork:

==================================

CREATE TABLE [dbo].[tblBOMEntries] (
[fldID] [int] IDENTITY (1, 1) NOT NULL ,
[fldCMMPartID] [int] NULL ,
[fldSIPartNo] [varchar] (20) NULL ,
[fldDescription] [varchar] (50) NULL ,
[fldQtyAssy] [int] NULL ,
[fldItemNo] [int] NULL ,
[fldOnIPL] [bit] NOT NULL ,
[fldRefDesig] [text] NULL ,
[fldParentID] [int] NULL ,
[fldBOMLevel] [int] NULL ,
[sys_ts] [timestamp] NULL ,
[fldObsDate] [varchar] (15) NULL ,
[fldEffDate] [varchar] (15) NULL ,
[fldItemRevNo] [int] NULL ,
[fldModNo] [varchar] (10) NULL ,
[fldNewBOMFlag] [smallint] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tblCMMIndex] (
[fldCMMPartID] [int] IDENTITY (1, 1) NOT NULL ,
[fldMainDescription] [varchar] (50) NULL ,
[fldSIPartNo] [varchar] (50) NULL ,
[fldBOMRevision] [varchar] (5) NULL ,
[fldBOMAttached] [bit] NOT NULL ,
[fldBOMDate] [datetime] NULL ,
[fldCMMID] [int] NULL ,
[sys_ts] [timestamp] NULL ,
[fldLink] [int] NULL ,
[fldNewBOMRevision] [varchar] (5) NULL ,
[fldNewBOMAttached] [bit] NOT NULL ,
[fldNewBOMDate] [datetime] NULL ,
[fldSiteID] [int] NULL
) ON [PRIMARY]
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

setuser N'siipl'
GO
CREATE VIEW siipl.DoesNotWork
AS
SELECT dbo.tblBOMEntries.*,
dbo.tblCMMIndex.fldCMMPartID AS Expr1
FROM dbo.tblCMMIndex INNER JOIN
dbo.tblBOMEntries ON
dbo.tblCMMIndex.fldCMMPartID = dbo.tblBOMEntries.fldCMMPartID

================================

However, if I create a new view based on exactly the same SQL as
DoesNotWork I don't get the same error message:

CREATE VIEW dbo.DoesWork
AS
SELECT dbo.tblBOMEntries.*, dbo.tblCMMIndex.fldCMMPartID AS Expr1
FROM dbo.tblCMMIndex INNER JOIN
dbo.tblBOMEntries ON
dbo.tblCMMIndex.fldCMMPartID = dbo.tblBOMEntries.fldCMMPartID
The only difference that I can deduce between siipl.DoesNotWork and
dbo.DoesWork is the ownership. Can that be the problem? If so, why?

TIA

Edward
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Edward:

Do you have to run a script on the server just to re-link a table?

I've automated table and view linking from A97 to SS2000 without
having to do this; I just created a TableDef object and set the
connection properties.

Maybe I'm missing something?

-Matt

On 16 Jul 2003 02:32:16 -0700, te********@hotmail.com (Edward) wrote:
When I attempt to relink the tables in my Access app.


Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.