This is a multi-part message in MIME format.

------=_NextPart_000_00C5_01C73ED8.A6B50E10
Content-Type: text/plain;
charset="iso-8859-8-i"
Content-Transfer-Encoding: quoted-printable

I am using ExecuteScalar, executing a stored procedure with two =
commands:
the first command is Select command,=20
and the second is Insert.
Because of the Select command , The ExecuteScalar do not return an error =
in case of the Insert(second command -see the stored pro. sample in the =
bottom) failure.

the stored procedure:
CREATE PROCEDURE dbo.usp_UpdateOnline
@Id as bigint,
@source_file as nvarchar(50),

AS
declare @IsUpdate as int
EXEC @IsUpdate =3D mysp_IsIDExist @Id
SELECT @IsUpdate

--From this point no error is returned to Execue Scalar
INSERT=20
INTO online.dbo.T_all
(Id,
source_file ,
)

VALUES
( @Id
,@source_file
)

GO

please help

Leeor
------=_NextPart_000_00C5_01C73ED8.A6B50E10
Content-Type: text/html;
charset="iso-8859-8-i"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=3Drtl><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-8-i">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY dir=3Dltr>
<DIV><FONT face=3DArial size=3D2>I am using ExecuteScalar, executing a =
stored=20
procedure with two commands:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the first command is =
<STRONG>Select</STRONG>=20
command, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and the second is=20
<STRONG>Insert</STRONG>.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Because of =
the&nbsp;<STRONG>Select</STRONG> command=20
, The ExecuteScalar do not return an error in case of&nbsp;the=20
<STRONG>Insert(second command -see the stored pro. sample in the=20
bottom)</STRONG> failure.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the stored procedure:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>CREATE PROCEDURE&nbsp;=20
dbo.usp_UpdateOnline</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>@Id as bigint,<BR>@source_file as=20
nvarchar(50),</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>AS<BR>declare @IsUpdate as int<BR>EXEC =
@IsUpdate =3D=20
mysp_IsIDExist @Id</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SELECT @IsUpdate</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>--From this point no error is =
returned to=20
Execue Scalar<BR></STRONG>INSERT <BR>&nbsp;INTO =
online.dbo.T_all<BR>&nbsp;=20
(Id,<BR>&nbsp;&nbsp; source_file ,<BR>&nbsp; )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;VALUES<BR>&nbsp;(&nbsp; =
@Id<BR>&nbsp;&nbsp;=20
,@source_file<BR>&nbsp; )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>GO<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>please help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Leeor</DIV></FONT></BODY></HTML>

------=_NextPart_000_00C5_01C73ED8.A6B50E10--

Re: Using ExecuteScalar on ,Net Framework 1.1 by W

W
Tue Jan 23 14:44:23 CST 2007

This is a multi-part message in MIME format.

------=_NextPart_000_083C_01C73F05.5AE916C0
Content-Type: text/plain;
charset="iso-8859-8-i"
Content-Transfer-Encoding: quoted-printable

Leeor:

You need to Select the value - you are simply inserting, no? There's no =
query indicating which value to grab. Run another query our use an =
output parameter and that should do itfor you.
"Leeor Chernov" <leeor_chernov@mod.gov.il> wrote in message =
news:OI3%23HfsPHHA.4924@TK2MSFTNGP05.phx.gbl...
I am using ExecuteScalar, executing a stored procedure with two =
commands:
the first command is Select command,=20
and the second is Insert.
Because of the Select command , The ExecuteScalar do not return an =
error in case of the Insert(second command -see the stored pro. sample =
in the bottom) failure.

the stored procedure:
CREATE PROCEDURE dbo.usp_UpdateOnline
@Id as bigint,
@source_file as nvarchar(50),

AS
declare @IsUpdate as int
EXEC @IsUpdate =3D mysp_IsIDExist @Id
SELECT @IsUpdate

--From this point no error is returned to Execue Scalar
INSERT=20
INTO online.dbo.T_all
(Id,
source_file ,
)

VALUES
( @Id
,@source_file
)

GO

please help

Leeor
------=_NextPart_000_083C_01C73F05.5AE916C0
Content-Type: text/html;
charset="iso-8859-8-i"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=3Drtl><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-8-i">
<META content=3D"MSHTML 6.00.2900.2995" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY dir=3Dltr bgColor=3D#ffffff>
<DIV><FONT size=3D2>Leeor:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>You need to Select the value - you are simply =
inserting,=20
no?&nbsp; There's no query indicating which value to grab.&nbsp; Run =
another=20
query our use an output parameter and that should do itfor =
you.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Leeor Chernov" &lt;<A=20
=
href=3D"mailto:leeor_chernov@mod.gov.il">leeor_chernov@mod.gov.il</A>&gt;=
wrote=20
in message <A=20
=
href=3D"news:OI3%23HfsPHHA.4924@TK2MSFTNGP05.phx.gbl">news:OI3%23HfsPHHA.=
4924@TK2MSFTNGP05.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I am using ExecuteScalar, executing a =
stored=20
procedure with two commands:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the first command is =
<STRONG>Select</STRONG>=20
command, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and the second is=20
<STRONG>Insert</STRONG>.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Because of =
the&nbsp;<STRONG>Select</STRONG>=20
command , The ExecuteScalar do not return an error in case of&nbsp;the =

<STRONG>Insert(second command -see the stored pro. sample in the=20
bottom)</STRONG> failure.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the stored procedure:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>CREATE PROCEDURE&nbsp;=20
dbo.usp_UpdateOnline</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>@Id as bigint,<BR>@source_file as=20
nvarchar(50),</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>AS<BR>declare @IsUpdate as =
int<BR>EXEC @IsUpdate=20
=3D mysp_IsIDExist @Id</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SELECT @IsUpdate</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>--From this point no error is =
returned to=20
Execue Scalar<BR></STRONG>INSERT <BR>&nbsp;INTO =
online.dbo.T_all<BR>&nbsp;=20
(Id,<BR>&nbsp;&nbsp; source_file ,<BR>&nbsp; )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;VALUES<BR>&nbsp;(&nbsp; =
@Id<BR>&nbsp;&nbsp;=20
,@source_file<BR>&nbsp; )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>GO<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>please help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Leeor</DIV></BLOCKQUOTE></FONT></BODY></HTML>

------=_NextPart_000_083C_01C73F05.5AE916C0--


Re: Using ExecuteScalar on ,Net Framework 1.1 by Cor

Cor
Tue Jan 23 23:46:13 CST 2007

Bill,

Is there any reason that you sent to this newsgroup in HTML, please use the
standard textmode. I see not any reason why I should install Hebreic for
your message.

Cor




Re: Using ExecuteScalar on ,Net Framework 1.1 by W

W
Wed Jan 24 09:09:24 CST 2007

I just responded to Leeor's message which was in html. sorry about that.
"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:OAnyhq3PHHA.4124@TK2MSFTNGP06.phx.gbl...
> Bill,
>
> Is there any reason that you sent to this newsgroup in HTML, please use
> the standard textmode. I see not any reason why I should install Hebreic
> for your message.
>
> Cor
>
>
>



Re: Using ExecuteScalar on ,Net Framework 1.1 by Cor

Cor
Wed Jan 24 11:45:15 CST 2007

I am sure that you know that I knew that

:-)

Cor

"W.G. Ryan [MVP]" <WilliamRyan@nospam.gmail.com> schreef in bericht
news:eCKVjm8PHHA.1280@TK2MSFTNGP04.phx.gbl...
>I just responded to Leeor's message which was in html. sorry about that.
> "Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
> news:OAnyhq3PHHA.4124@TK2MSFTNGP06.phx.gbl...
>> Bill,
>>
>> Is there any reason that you sent to this newsgroup in HTML, please use
>> the standard textmode. I see not any reason why I should install Hebreic
>> for your message.
>>
>> Cor
>>
>>
>>
>
>