Solved

SQL 2005 CommandText Syntax

Posted on 2011-09-27
2
292 Views
Last Modified: 2012-06-21
How do I format the following correctly?  I am passing in EmployeeID and ManagerID

 cmd2.CommandText = "Update CNote_CasAssetManagers Set AssetMgrID, EmployeeID = '" & ManagerID & "','" & EmpID
0
Comment
Question by:Annette Wilson, MSIS
2 Comments
 
LVL 5

Accepted Solution

by:
eridanix earned 500 total points
ID: 36712801
cmd2.CommandText = "UPDATE dbo.CNote_CasAssetManagers SET AssetMgrID = '" & ManagerID & "', EmployeeID = '" & EmpID & "'"

But be carefull!!! This query change all records in table!!! Maybe there should be a WHERE statement in query.
0
 

Author Closing Comment

by:Annette Wilson, MSIS
ID: 36712827
Thank youu.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now