Solved

SQL 2005 CommandText Syntax

Posted on 2011-09-27
2
296 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

770 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