Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Visual Studio Visual Basic-- SQl  Update Statment

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

'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 …
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

837 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