RE: after INSERT fail, make UPDATE guidelines
- From: changliw@xxxxxxxxxxxxxxxxxxxx ("Charles Wang [MSFT]")
- Date: Tue, 23 Sep 2008 09:44:01 GMT
Hi Mike,
Thank you for using Microsoft MSDN Managed Newsgroup.
By design OLE DB does not accept named parameters. However if your intention is to recognize which column for each parameter it represents, you can create a stored procedure in your SQL
Server database. Once you set the SqlCommand text as "exec proc_name ?,?,...", you can find that the Destination Columns are automatically displayed as the parameters names of the
stored procedure. If you create meaningful parameters names for your stored procedure, you can get meaningful parameter names in your OLE DB Command.
So regarding your two questions:
1) Is there way to use named parameters in the OLE DB Command?
Yes, by using a stored procedure.
2) Is there another way to perform update command based on keys in the destination table??
Yes, by using a stored procedure.
Hope this helps. If there is anything unclear, please feel free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
.
- References:
- after INSERT fail, make UPDATE guidelines
- From: Mirek Endys
- after INSERT fail, make UPDATE guidelines
- Prev by Date: RE: Same connection manager for multiple control flow tasks
- Next by Date: dtswizard insert identity
- Previous by thread: after INSERT fail, make UPDATE guidelines
- Next by thread: RE: after INSERT fail, make UPDATE guidelines
- Index(es):
Relevant Pages
|