Solved

Visual Studio Visual Basic-- SQl  Update Statment

Posted on 2007-03-22
2
179 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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