Solved

Visual Studio Visual Basic-- SQl  Update Statment

Posted on 2007-03-22
2
183 Views
Last Modified: 2013-11-26
I'm getting a syntax error near TransferGuestLedgertxt

.CommandText = "Update Settlement Set PreviouAdvDepositstxtTextBox= '" & PreviouAdvDepositstxtTextBox.Text & "' TransferGuestLedgertxt = '" & TransferGuestLedgertxt.Text & "', Where Sitetxt = 2 and PrimaryKey = (Select Max(PrimaryKey) from Settlement where SiteTxt=2)"

Thanks
0
Comment
Question by:fsuedu
2 Comments
 
LVL 6

Expert Comment

by:kerryw60
ID: 18774136
May need to specify your textbox is a string by

TransferGuestLedgertxt.Text.ToString()
0
 
LVL 9

Accepted Solution

by:
dbeneit earned 500 total points
ID: 18776414
.CommandText = "Update Settlement Set PreviouAdvDepositstxtTextBox= '" & PreviouAdvDepositstxtTextBox.Text & "',
................................................................-
 TransferGuestLedgertxt = '" & TransferGuestLedgertxt.Text & "'
........................................................................................................-
Where Sitetxt = 2 and PrimaryKey = (Select Max(PrimaryKey) from Settlement where SiteTxt=2)"

the ',' character
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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