RE: after INSERT fail, make UPDATE guidelines

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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.
=========================================================

.



Relevant Pages

  • RE: Sql Server 2005 Setup will not run
    ... Thank you for using Microsoft MSDN Managed Newsgroup. ... Is there any SQL Server instance installed on the machine? ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.tools)
  • RE: SQLXMLBULKLOAD question: Does it INSERT only, or can it UPDATE as well?
    ... Thank you for using Microsoft MSDN Managed Newsgroup. ... However you do not want to first delete the data from the table and then bulk insert the data into to the table. ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.xml)
  • RE: automating running a stored procedure
    ... Thank you for using Microsoft MSDN Managed Newsgroup. ... If you use SQL Server express edition, since the SQL Agent Service is not ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.dts)
  • RE: Alias best way in SQL Server
    ... Thank you for using Microsoft MSDN Managed Newsgroup. ... application connect to the SQL Server? ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.server)
  • RE: Invalid Reference Error
    ... Welcome to Microsoft MSDN Managed Newsgroup. ... An MDE file is the same as a regular Access MDB database file, ... Microsoft Online Community Support ...
    (microsoft.public.access.forms)