Solved

SQL 2005 CommandText Syntax

Posted on 2011-09-27
2
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.
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.

734 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