Solved

Visual Studio Visual Basic-- SQl  Update Statment

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now