Ask a Question related to ASP Database, Design and Development.
-
dw #1
Operand type clash
Hello all. We have a page that calls a SQL Server database using this
method,
cn.uspGetEventPerson Null, Null, rsEventPersons
where cn is our connection object, and uspGetEventPerson is the stored
procedure. When we call the database with nulls, we get the following error:
Microsoft OLE DB Provider for SQL Server
Operand type clash: text is incompatible with int
Both of the fields are integer fields, and the stored procedure. When we use
an ADO Command object and define the parameters, it works fine, even if
those two parameters are null. Why does the shortcut method break and the
command object work? Thanks in advance.
dw Guest
-
Clash of GUIDs SelectPageRange.ocx and DSOFramer.ocx
I have used DSOFramer for some time to embed Microsoft office apps into my applications. It comes from Microsoft but is not fully supported by them.... -
wrong operand type - error
I've seen a decent number of people who have said that they have received the same error that I have now received. I received some artwork in Quark... -
Help with an illegal 'operand'?
Does anyone know why I'm getting this error message - Can't open illustration. The illustration contains illegal operand. Offending operator :... -
illegal operand problem.
Oh dear, it was all going so well and then this came up when I tried to re-open my AI file. When I click OK I get a page with the correct size but... -
operand variable question
I am creating a flash calculator and used the actionscript from the sample included in the program. What i would like to know is where does this... -
Bob Barrows [MVP] #2
Re: Operand type clash
dw wrote:
It would help if you showed the portion of your CREATE PROCEDURE statement> Hello all. We have a page that calls a SQL Server database using this
> method,
>
> cn.uspGetEventPerson Null, Null, rsEventPersons
>
> where cn is our connection object, and uspGetEventPerson is the stored
> procedure. When we call the database with nulls, we get the following
> error:
>
> Microsoft OLE DB Provider for SQL Server
> Operand type clash: text is incompatible with int
>
> Both of the fields are integer fields, and the stored procedure.
in which the parameters are declared. Without that, we have to resort to
guesswork.
Without the explicit Command object, ADO is making a guess as to datatype,> When
> we use an ADO Command object and define the parameters, it works
> fine, even if those two parameters are null. Why does the shortcut
> method break and the command object work? Thanks in advance.
and guessing wrong. Are these optional parameters? If so, you should be able
to call the procedure without specifying these arguments:
cn.uspGetEventPerson rsEventPersons
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest
-
dw #3
Re: Operand type clash
Thanks, Bob. Here's the procedure's CREATE portion,
CREATE PROCEDURE dbo.uspGetEventPerson
@prmEventID int = null,
@prmTerm varchar (6) = null
AS .....
The second parameter is a varchar, not an int as indicated earlier. These
two parameters are optional. Thanks for your help.
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eXI9%2392MEHA.3944@tk2msftngp13.phx.gbl...able> dw wrote:>> > Hello all. We have a page that calls a SQL Server database using this
> > method,
> >
> > cn.uspGetEventPerson Null, Null, rsEventPersons
> >
> > where cn is our connection object, and uspGetEventPerson is the stored
> > procedure. When we call the database with nulls, we get the following
> > error:
> >
> > Microsoft OLE DB Provider for SQL Server
> > Operand type clash: text is incompatible with int
> >
> > Both of the fields are integer fields, and the stored procedure.
> It would help if you showed the portion of your CREATE PROCEDURE statement
> in which the parameters are declared. Without that, we have to resort to
> guesswork.
>>> > When
> > we use an ADO Command object and define the parameters, it works
> > fine, even if those two parameters are null. Why does the shortcut
> > method break and the command object work? Thanks in advance.
> Without the explicit Command object, ADO is making a guess as to datatype,
> and guessing wrong. Are these optional parameters? If so, you should be> to call the procedure without specifying these arguments:
>
> cn.uspGetEventPerson rsEventPersons
>
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
dw Guest
-
Bob Barrows [MVP] #4
Re: Operand type clash
dw wrote:
That explains the error message.> Thanks, Bob. Here's the procedure's CREATE portion,
>
> CREATE PROCEDURE dbo.uspGetEventPerson
> @prmEventID int = null,
> @prmTerm varchar (6) = null
> AS .....
>
> The second parameter is a varchar, not an int as indicated earlier.
So does my suggestion work?> These two parameters are optional. Thanks for your help.
>
cn.uspGetEventPerson rsEventPersons
>
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:eXI9%2392MEHA.3944@tk2msftngp13.phx.gbl...>> dw wrote:>>>>> Hello all. We have a page that calls a SQL Server database using
>>> this method,
>>>
>>> cn.uspGetEventPerson Null, Null, rsEventPersons
>>>
>>> where cn is our connection object, and uspGetEventPerson is the
>>> stored procedure. When we call the database with nulls, we get the
>>> following error:
>>>
>>> Microsoft OLE DB Provider for SQL Server
>>> Operand type clash: text is incompatible with int
>>>
>>> Both of the fields are integer fields, and the stored procedure.
>> It would help if you showed the portion of your CREATE PROCEDURE
>> statement in which the parameters are declared. Without that, we
>> have to resort to guesswork.
>>>>>>> When
>>> we use an ADO Command object and define the parameters, it works
>>> fine, even if those two parameters are null. Why does the shortcut
>>> method break and the command object work? Thanks in advance.
>> Without the explicit Command object, ADO is making a guess as to
>> datatype, and guessing wrong. Are these optional parameters? If so,
>> you should be able to call the procedure without specifying these
>> arguments:
>>
>> cn.uspGetEventPerson rsEventPersons
>>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest
-
dw #5
Re: Operand type clash
Yes, it does. Works like a charm! Thanks, Bob.
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:Os%23fwP3MEHA.3348@TK2MSFTNGP09.phx.gbl...> dw wrote:>> > Thanks, Bob. Here's the procedure's CREATE portion,
> >
> > CREATE PROCEDURE dbo.uspGetEventPerson
> > @prmEventID int = null,
> > @prmTerm varchar (6) = null
> > AS .....
> >
> > The second parameter is a varchar, not an int as indicated earlier.
> That explains the error message.
>> So does my suggestion work?> > These two parameters are optional. Thanks for your help.
> >
>
> cn.uspGetEventPerson rsEventPersons
>>> >
> > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> > news:eXI9%2392MEHA.3944@tk2msftngp13.phx.gbl...> >> dw wrote:
> >>> Hello all. We have a page that calls a SQL Server database using
> >>> this method,
> >>>
> >>> cn.uspGetEventPerson Null, Null, rsEventPersons
> >>>
> >>> where cn is our connection object, and uspGetEventPerson is the
> >>> stored procedure. When we call the database with nulls, we get the
> >>> following error:
> >>>
> >>> Microsoft OLE DB Provider for SQL Server
> >>> Operand type clash: text is incompatible with int
> >>>
> >>> Both of the fields are integer fields, and the stored procedure.
> >>
> >> It would help if you showed the portion of your CREATE PROCEDURE
> >> statement in which the parameters are declared. Without that, we
> >> have to resort to guesswork.
> >>
> >>> When
> >>> we use an ADO Command object and define the parameters, it works
> >>> fine, even if those two parameters are null. Why does the shortcut
> >>> method break and the command object work? Thanks in advance.
> >>
> >> Without the explicit Command object, ADO is making a guess as to
> >> datatype, and guessing wrong. Are these optional parameters? If so,
> >> you should be able to call the procedure without specifying these
> >> arguments:
> >>
> >> cn.uspGetEventPerson rsEventPersons
> >>
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
dw Guest



Reply With Quote

