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 9299871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:39:33+00:00 2026-06-18T22:39:33+00:00

Created a vb.net app that is moving data from Microsoft SQL Server to MySQL.

  • 0

Created a vb.net app that is moving data from Microsoft SQL Server to MySQL. All my insert functions have worked so far except the following. It appears that the issue is with a field that has comma’s in the text and is causing a problem.

I believe the issue is with the column ‘Categories’. It has values like ’11|0,1|0,12|0′.

Are comma needed to be handled in a special way?

Error:
Sql error: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Separator,C_ID,EntryDt,S_ID) VALUES (1,1455090, ’11|0,1’ at line 1

Code:

#Region " InsertTable_Activity "
    Function InsertTable_Activity(ByVal Activity_ID As Integer, _
        ByVal Categories As String, _
        ByVal Separator As String, _
        ByVal C_ID As Integer, _
        ByVal EntryDt As DateTime, _
        ByVal S_ID As Integer, _
         ByVal myCon As MySqlConnection) As String

        Dim sRetVal As String = ""
        Dim sSQL As String = "INSERT INTO CandidateInsertResumeDetailCategories_Activity (Activity_ID,Categories,Separator,C_ID,EntryDt,S_ID) VALUES (?Activity_ID, ?Categories, ?Separator, ?C_ID,?EntryDt,?S_ID)"
        Dim myCmd As MySqlCommand = New MySqlCommand(sSQL, myCon)
        myCmd.CommandType = Data.CommandType.Text
        myCmd.Parameters.Add(New MySqlParameter("?Activity_ID", MySqlDbType.Int32)).Value = Activity_ID
        myCmd.Parameters.Add(New MySqlParameter("?Categories", MySqlDbType.VarChar, 500)).Value = Categories
        myCmd.Parameters.Add(New MySqlParameter("?Separator", MySqlDbType.VarChar, 10)).Value = Separator
        myCmd.Parameters.Add(New MySqlParameter("?C_ID", MySqlDbType.Int32)).Value = C_ID
        myCmd.Parameters.Add(New MySqlParameter("?EntryDt", MySqlDbType.DateTime)).Value = EntryDt
        myCmd.Parameters.Add(New MySqlParameter("?S_ID", MySqlDbType.Int32)).Value = S_ID

        Try
            If myCon.State <> Data.ConnectionState.Open Then
                myCon.Open()
            End If

            myCmd.ExecuteNonQuery()
            myCmd.Dispose()

        Catch sqlEx As MySqlException
            sRetVal = "ERROR: Sql error: " & sqlEx.ToString & vbCrLf & " - SQL used: " & sSQL
        Catch ex As Exception
            sRetVal = "ERROR: Regular error: " & ex.ToString & vbCrLf & " - SQL used: " & sSQL
        Finally
        End Try

        Return sRetVal
    End Function
#End Region
  • 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-06-18T22:39:35+00:00Added an answer on June 18, 2026 at 10:39 pm

    SEPARATOR is a reserved keyword, you should escape it with backtick,

    INSERT INTO CandidateInsertResumeDetailCategories_Activity 
                (Activity_ID, Categories, `Separator`, C_ID, EntryDt, S_ID) 
    VALUES .....
    
    • MySQL Reserved Keywords List

    Another word-of-advice is not to use any names which on the list of reserved keywords.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a C#.net app that uses dates from a SQL Server 2008 database
We have a .NET 2.0 winforms app that connects to a SQL Server 2005
I have created an App that gets data from Web Services on an In
I have created a .Net application to run on an App Server that gets
I have created an app in C# .Net 2.0 that uses the AxShockwaveFlash object
I'm working on an ASP.NET MVC App that has buttons that have the server
I have created an asp.net website that is to be accessed from client browsers
I have created a class that authorises a vb.net app to access Google Fusion
I have an app that was created using .net Framework 3.5. However, I now
I have created a app that record video and store it on server now

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.