On Thu, May 28, 2015 at 12:17 PM, <
[email protected]> wrote:

> Busy at the moment, but throwing out this quick question:  if you're using
> named parameters like below, can you get burnt?
>
> INSERT INTO Users (FirstName, LastName, UserID) VALUES (?pcFirstName,
> ?pcLastName, ?pcUserID)
> -------------
>>
>>

Yes you can as if this was in VFP.  In SQL Server you put in a terminating
character and then continue with another command.  Oracle I am not sure
of.  With mySQL yes as well.

Now had you created a stored procedure with input parms then NO that would
not work the same way.  Below is a simple insert sproc that fires a lot in
one of my EDI apps. The @paramname within SQL Server will be treated
differently by the engine then you passin the sting above to be executed on
it's own.



ALTER PROCEDURE [dbo].[EDIReceive_ins]

@FileID numeric (18,0),
@FileType varchar (20),
@TradingPartnerID varchar (50),
@EDIString text,
@Suspect bit,
@AcknowledgementID numeric (18,0),
@Processed bit,
@Direction varchar(4)

as
Begin
Insert Into [dbo].EDIReceive (

FileType ,
TradingPartnerID ,
EDIString ,
Suspect ,
AcknowledgementID ,
Processed,
Direction
) Values(

@FileType ,
@TradingPartnerID ,
@EDIString ,
@Suspect ,
@AcknowledgementID ,
@Processed,
@Direction
)
end





-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYJ271Q2MAMa6c3=ukhntvmuj8sk+o-kz+_ztnxg6ko...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to