LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 11-04-2009, 09:08 AM   #1
scheidel21
Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 5.0(Lenny), Vista, XP , WIN7, Server 03/08
Posts: 713
Thanked: 20
SQL update statement to SQL SERVER 2005


[Log in to get rid of this advertisement]
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

Alex
linuxdebian scheidel21 is offline  
Tag This Post , , , ,
Reply With Quote
Old 11-04-2009, 10:20 PM   #2
Clachair
LQ Newbie
 
Registered: Dec 2008
Location: New York
Distribution: Red Hat 7.2
Posts: 2
Thanked: 0
My SQL

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.
Else http://dev.mysql.com/doc/
Also, don't forget to UNLOCK the table.

Good luck

John

Last edited by Clachair; 11-04-2009 at 10:24 PM..
windows_vista Clachair is offline     Reply With Quote


Old 11-05-2009, 07:30 PM   #3
scheidel21
Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 5.0(Lenny), Vista, XP , WIN7, Server 03/08
Posts: 713
Thanked: 20

Original Poster
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.
windows_xp_2003 scheidel21 is offline     Reply With Quote



Reply

Bookmarks


Thread Tools

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 03:16 AM
LXer: Review: Microsoft SQL Server 2005 Unleashed LXer Syndicated Linux News 0 05-11-2007 12:16 AM
Managing Microsoft SQL Server 2005 on linux Blue_Ice Linux - Enterprise 1 10-03-2006 11:48 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 03:20 PM
SQL statement glj Programming 1 10-12-2001 10:29 AM


All times are GMT -5. The time now is 03:48 AM.

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