[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL 2005 CommandText Syntax

Posted on 2011-09-27
2
Medium Priority
?
307 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 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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…
Suggested Courses

834 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