Reply to Re: operand type clash

Your name:

Reply:


Posted by Erland Sommarskog on 12/22/05 01:08

coop (carol.cooper@intura.com) writes:
> I found a solution. I knew it had something to do with null values,
> so I dropped the table involved and recreated it declaring the
> fields involved with defaults of '' instead of null and that solved
> the problem.
>
> Original table structure:
>
> CREATE TABLE [dbo].[Employee_Fingerprint] (
> [Location_Code] [varchar] (8) NOT NULL ,
> [Employee_Code] [varchar] (8) NOT NULL ,
> [Fingerprint_Template1] [text] NOT NULL ,
> [Fingerprint_Template2] [text] NULL,
> [Fingerprint_Template3] [text] NULL,
> [Fingerprint_Template4] [text] NULL
> ) ON [PRIMARY]
> GO
>
> This caused operand type clash on MSDE when trying to insert a record,
> but worked fine on SQL2000 and SQL2005
>
> Restructuring the table like this:
> CREATE TABLE [dbo].[Employee_Fingerprint] (
> [Location_Code] [varchar] (8) NOT NULL ,
> [Employee_Code] [varchar] (8) NOT NULL ,
> [Fingerprint_Template1] [text] NOT NULL ,
> [Fingerprint_Template2] [text] DEFAULT '',
> [Fingerprint_Template3] [text] DEFAULT '' ,
> [Fingerprint_Template4] [text] DEFAULT ''
> ) ON [PRIMARY]
> GO
>
> solves the problem.
>
> If any of you SQL gurus knows why, I'd really appreciate hearing
> from you. It's been driving me nuts.

Maybe if you post the offending code, we might be able to think of
an explanation.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация