Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-04-2009, 08:08 AM   #1
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
SQL update statement to SQL SERVER 2005

I am trying to write an application to resequence some items based on being alphabetized. In order to do this I have to run a query to grab data from two table, I pull that down to a local dataset, work on the data then want to update it back to the database backend. The problem I am running into is it seems my Update statement sucks. It tells me that the column I want to update cannot be bound. Does anyone know the wording of an SQL update query to update a table that was modified through a query? Even if it is not MS SQL SERVER syntactically correct or specific anything could help me figure this out.

Thanks a lot

Old 11-04-2009, 09:20 PM   #2
LQ Newbie
Registered: Dec 2008
Location: New York
Distribution: Red Hat 7.2
Posts: 4

Rep: Reputation: 0

The syntax for updates is fairly simple; the example given in the mysql docs reads:
mysql> UPDATE pet SET birth = "1989" WHERE name = "Bowser";
and you should be able to test your application statement with a command line. If you have a syntax problem you'll get an error message.
Also, don't forget to UNLOCK the table.

Good luck


Last edited by Clachair; 11-04-2009 at 09:24 PM.
Old 11-05-2009, 06:30 PM   #3
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Original Poster
Rep: Reputation: 98
Actually The issue I was having is that all the examples don't use a column from another table. But it is a moot point at this juncture. After a lot of research VB.NET OleDb cannot execute an update on a multitable query. I have had to rewrite the code and go an alternate route. Thank you for your input though, I appreciate it very much.


cannot, sql, update

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL statement assembler for C++? ta0kira Programming 3 03-07-2009 02:16 AM
LXer: Review: Microsoft SQL Server 2005 Unleashed LXer Syndicated Linux News 0 05-10-2007 11:16 PM
[SOLVED] Managing Microsoft SQL Server 2005 on linux Blue_Ice Linux - Enterprise 1 10-03-2006 10:48 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
SQL statement glj Programming 1 10-12-2001 09:29 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration