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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:18:45+00:00 2026-05-27T15:18:45+00:00

I have a client application built in C# which sends an image along with

  • 0

I have a client application built in C# which sends an image along with an id to a webservice. The webservice then receives these information and inserts them in a MySQL database. But someone, the webmethod cannot recognize the Image and instead, it is just saving @icon in the database….can anyone tell me where I am making an error? Thanks in advance!

[WebMethod]
public string sendDataToMySql(string application_id, byte[] buffer)
{
    string MyConString = "SERVER=localhost;" +
           "DATABASE=test;" +
           "UID=root;" +
           "PASSWORD=password;";


    MySqlConnection connection = new MySqlConnection(MyConString);
    connection.Open();
    MySqlCommand command = new MySqlCommand("", connection);
    command.CommandText = "UPDATE application SET icon='@icon' WHERE application_id='" + application_id +"';";

    MySqlParameter oParam1 = command.Parameters.Add("@icon", MySqlDbType.Blob);
    oParam1.Value = buffer;

    command.ExecuteNonQuery();

    connection.Close();
    return "Data was inserted successfully!";
   }
  • 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-27T15:18:47+00:00Added an answer on May 27, 2026 at 3:18 pm

    If i had to guess anything, it’d be that SET icon='@icon' needs to be SET icon=@icon. The former only makes sense if you actually want to insert that string literal.

    And the second thing I’d be wondering about is @icon vs. ?icon. I’m seeing asp.net code on stackoverflow referencing the question mark syntax and dev.mysql.com referencing the at symbol syntax.

    I must confess which would be right for any existing drivers out there.

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

Sidebar

Related Questions

BACKGROUND: I have built a web application for a client which allows them to
I have a WCF client which passes Self-Tracking Entities to a WPF application built
I have a legacy VB6 application that was built using MSDE. As many client's
I have an application that runs on a client's server built on a SQL
I have C# Client application calling Windows webservice written in WCF calling Sql Procedure
I have a client server application that sends XML over TCP/IP from client to
Here's a use case: I have a desktop application (built using Eclipse RCP) which
I have a winforms application which is built dynamically by another application, now the
I have built an completely AJAX based application which has no page refresh and
I have built an android application which has a single mapview. I have a

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.