Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6383429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:38:55+00:00 2026-05-25T02:38:55+00:00

I was having problems updating information in my SQL database using my vb.net application,

  • 0

I was having problems updating information in my SQL database using my vb.net application, but recently I found the solution. However now I have run into another problem which is shown in the code below:

 Private Sub cmdupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdupdate.Click
   Dim conn As New MySqlConnection
    Dim myCommand As New MySqlCommand

    '#######
    conn.ConnectionString = "server=" & frmLogin.txtserver.Text & ";" _
& "user id=" & frmLogin.txtusername.Text & ";" _
& "password=" & frmLogin.txtpassword.Text & ";" _
& "database=in_out"
    '#######

    myCommand.Connection = conn
    myCommand.CommandText = "UPDATE event SET" _
        & "status = ?Status " _
        & "WHERE user_id = ?UserID AND message_id = ?MessageID AND creator = ?Creator"

    myCommand.Parameters.AddWithValue("?UserID", myUserID)
    myCommand.Parameters.AddWithValue("?MessageID", cbomessage.SelectedValue)
    myCommand.Parameters.AddWithValue("?Status", cbostatus.SelectedItem)
    myCommand.Parameters.AddWithValue("?Creator", myUserID)
    myCommand.Connection = conn
    Try
        myCommand.Connection.Open()
        myCommand.ExecuteNonQuery()
        myCommand.Connection.Close()
    Catch myerror As MySqlException
        MsgBox("There was an error updating the database: " & myerror.Message)
    End Try
End Sub

The exception message is:

Fatal error encountered during command execution.

I don’t know if this is simply a syntax error that can be fixed easily, or something to do with my database configuration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:38:56+00:00Added an answer on May 25, 2026 at 2:38 am

    If I decipher your screen shot correctly, then your UPDATE statement is being put together:

    "UPDATE event SET" &
    "status = ?Status" &
    "WHERE user_id = ....... "
    

    This results in:

    UPDATE event SETstatus = ?StatusWHERE user_id = .......
    

    so you’re really only missing some spaces!

    "UPDATE event SET " &    -- observe the SPACE after the SET !
    "status = ?Status " &    -- observe the SPACE after the ?Status
    "WHERE user_id = ....... "
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems passing information, updating progress and indicating done with a SwingWorker class
I'm having problems updating a div's content in IE using .update; I also tried
I'm haing a few problems updating a row in my database using Linq2Sql. Inside
I'm trying to draw on the screen pixel-by-pixel using XNA, but am having problems
I'm having problems updating a mysql database. I want to run this script on
We're having mysterious network problems with MySQL. Simple update query (updating single row using
I'm having problems updating records to contain NULL values - in particular, a field
Im having problems building a query with the linq to sql data query expression
Im having problems with classpaths. I have used them before with import but I'm
I have recently started having problems with TortoiseCVS, or more specifically with plink, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.