I have a stored procedure that works fine on SQL Server 2000 or 2005,
but when run on an machine running MSDE, I get the Operand type clash,
int is incompatible with text data type error. The data type is
actually text and text is the type of data being passed. Any
parameters not being used are defaulted to null. Any ideas why this
would happen on MSDE and work fine anywhere else?
Thanks so much. 2 16989
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_Finger print] (
[Location_Code] [varchar] (8) NOT NULL ,
[Employee_Code] [varchar] (8) NOT NULL ,
[Fingerprint_Tem plate1] [text] NOT NULL ,
[Fingerprint_Tem plate2] [text] NULL,
[Fingerprint_Tem plate3] [text] NULL,
[Fingerprint_Tem plate4] [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_Finger print] (
[Location_Code] [varchar] (8) NOT NULL ,
[Employee_Code] [varchar] (8) NOT NULL ,
[Fingerprint_Tem plate1] [text] NOT NULL ,
[Fingerprint_Tem plate2] [text] DEFAULT '',
[Fingerprint_Tem plate3] [text] DEFAULT '' ,
[Fingerprint_Tem plate4] [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.
coop (ca**********@i ntura.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_Finger print] ( [Location_Code] [varchar] (8) NOT NULL , [Employee_Code] [varchar] (8) NOT NULL , [Fingerprint_Tem plate1] [text] NOT NULL , [Fingerprint_Tem plate2] [text] NULL, [Fingerprint_Tem plate3] [text] NULL, [Fingerprint_Tem plate4] [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_Finger print] ( [Location_Code] [varchar] (8) NOT NULL , [Employee_Code] [varchar] (8) NOT NULL , [Fingerprint_Tem plate1] [text] NOT NULL , [Fingerprint_Tem plate2] [text] DEFAULT '', [Fingerprint_Tem plate3] [text] DEFAULT '' , [Fingerprint_Tem plate4] [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, es****@sommarsk og.se
Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin Koekenberg |
last post by:
Hello,
Ik get the following error when I install a new Python software
package such as Zope or PIL.
This is what I get whem I 'make' Zope :
running build_ext
Traceback (most recent call last):
File "/usr/local/zope/Zope-2.7.2-0/setup.py", line 1091, in ?
|
by: Rakesh |
last post by:
In my Python code fragment, I want to write a code fragment such that
the minimum element of a tuple is subtracted from all the elements of a
given
tuple.
When I execute the following python script I get the following
interpreter
error.
|
by: yaffa |
last post by:
hey folks i get this error: Python interpreter error: unsupported operand
type(s) for |:
when i run this line of code:
for incident in bs('tr', {'bgcolor' : '#eeeeee'} | {'bgcolor' :
'white'} ):
any idea what i'm doing wrong here?
|
by: tanusreesen |
last post by:
Hi All,
I am completely new to python programming language.I was trying to write a program on class.But I am getting this error.Can someone please help me to solve the error I am facing.I am using python2.5.
This is exactly what I wrote and still came up with this error
class point:
def __init__(self,x=0,y=0):
self.x=x
self.y=y
def _str_(self):
return '('+ str(self.x)+', ' + str(self.y) + ')'
|
by: Florian Lindner |
last post by:
Hello,
I get the exception above when trying to use a float as radix and exponent,
e.g.:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for ^: 'float' and 'float'
How can I use floats for powers?
| |
by: Gilbert Fine |
last post by:
This is a very strange exception raised from somewhere in our program.
I have no idea how this happen. And don't know how to reproduce. It
just occurs from time to time.
Can anyone give me some suggestion to fix this?
Thanks.
--
Gilbert
|
by: Jordan Harry |
last post by:
I'm trying to write a simple program to calculate permutations. I created a file called "mod.py" and put the following in it:
def factorial(n):
a = n
b = n
while a>0 and b>1:
n = (n)*(b-1)
b = b-1
def perm(n, r):
|
by: Paul Moore |
last post by:
I'm trying to implement an extension type with a power operator. The
operator is unusual in that I want to allow my objects to be raised to
an integer power:
p = Pattern()
p3 = p ** 3
I've implemented the code for a nb_power slot, it converts the "other"
argument to a C long using PyInt_AsLong().
|
by: flapjacks |
last post by:
line1 = ((0.0, -1.0), (1.0, 1.0), (2.0, 3.0), (3.0, 5.0), (4.0, 7.0), (5.0, 9.0), (6.0, 11.0), (7.0, 13.0), (8.0, 15.0), (9.0, 17.0))
line2 = ((0.0, 2.0), (1.0, 1.0), (2.0, 0.0), (3.0, -1.0), (4.0, -2.0), (5.0, -3.0), (6.0, -3.0), (7.0, -5.0), (8.0, -6.0), (9.0, -7.0))
num1 = str(len(line1))
num2 = str(len(line2))
x1 = str(line1-line1)
y1 = str(line1-line1)
m1 = (y1/x1)
b1 = (y1 - m1*x1)
x2 = str(line2-line1)
y2 = str(line2-line1)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |