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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:25:36+00:00 2026-06-02T10:25:36+00:00

As I haven’t found a solution to my previous question ( Link ), I

  • 0

As I haven’t found a solution to my previous question (Link), I am posting a new one, hoping for a solution. I’m sorry if I am breaking the rules, but I haven’t received a solution.

when I try to update a row, and I have tracked what query is sent, for example:

UPDATE global_status SET title = 'Login_Failure', info = 'שדכ' WHERE id = '2'

So you can see that the final query which is sent is in Hebrew, so it’s not a problem before that. I execute it this way:

string Status_Update = "UPDATE global_status SET title = '" + Title + "', info = '" + Info + "' WHERE id = '" + Request.Form["Status_Key"] + "'";

MyAdoHelper.DoQuery(GlobalVar.DatabaseName, Status_Update);

The method:

public static void DoQuery(string fileName, string sql)
{
    SqlConnection conn = ConnectToDb(fileName);
    conn.Open();
    SqlCommand com = new SqlCommand(sql, conn);
    com.ExecuteNonQuery();
    com.Dispose();
    conn.Close();
}

After the update, the database contains ??? where I inserted Hebrew letters.

I can manually insert Hebrew values into the database, and also get them back.

I have another form (registration) where I am able to insert Hebrew values, using the DoQuery();

Here is the source code for the update page (it’s updating a title and info of a record, nothing special):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class admin_EditGlobalStatus : System.Web.UI.Page
{
    public string StatusesTable;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Form["Status_Update"] != null)
        {
            string Title = Request.Form["Status_Title"].Secure();
            string Info = Request.Form["Status_Info"].Secure();

            Info = Info.Replace("/s", "<span class\"res\">").Replace("/e", "</span>");

            string Status_Update = "UPDATE global_status SET title = '" + Title + "', info = '" + Info + "' WHERE id = '" + Request.Form["Status_Key"] + "'";

            MyAdoHelper.DoQuery(GlobalVar.DatabaseName, Status_Update);
        }

        if (Request.Form["Status_Delete"] != null)
        {
            string Status_Delete = "DELETE FROM global_status WHERE id = '" + Request.Form["Status_Key"] + "'";
            MyAdoHelper.DoQuery(GlobalVar.DatabaseName, Status_Delete);
        }

        string GetGlobalStatuses = "SELECT * FROM global_status";
        DataTable dt = MyAdoHelper.ExecuteDataTable(GlobalVar.DatabaseName, GetGlobalStatuses);

        if (dt.Rows.Count > 0)
        {
            StatusesTable = "<table cellspacing=\"15\">";

            StatusesTable += "<th>כותרת ההודעה</th><th>מידע ההודעה</th>";

            foreach (DataRow status in dt.Rows)
            {
                StatusesTable += "<tr><form method=\"post\" action=\"\">";

                StatusesTable += "<input type=\"hidden\" name=\"Status_Key\" value=\"" + status["id"].ToString() + "\" />";
                StatusesTable += "<td><input size=\"25\" dir=\"ltr\" type=\"text\" name=\"Status_Title\" value=\"" + status["title"].ToString() + "\" /></td>";
                StatusesTable += "<td><input size=\"90\" type=\"text\" name=\"Status_Info\" value=\"" + status["info"].ToString().Secure() + "\" /></td>";

                StatusesTable += "<td><input type=\"submit\" name=\"Status_Update\" value=\"עדכן\"><input type=\"submit\" name=\"Status_Delete\" value=\"מחק\"></td></form></tr>\r\n";
            }

            StatusesTable += "</table>";
        }
        else
        {
            StatusesTable = "<h1>אין משתמשים קיימים</h1>";
        }
    }
}

Hoping for a solution, Thanks!

Guy

  • 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-02T10:25:40+00:00Added an answer on June 2, 2026 at 10:25 am

    After reading several text explanation I wound that many people are capable to solve the problem with N at the beginning of string like this

     string Status_Update = "UPDATE global_status SET  title = '" +
     Title + "', info =N'" + Info + "'  WHERE id = '" +
     Request.Form["Status_Key"] + "'";
    

    also make sure to try nvarchar or unicode

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

Sidebar

Related Questions

Haven't seen anything about it here but it seems to solve one of the
I haven't found this question, feel free to close if it's already up here.
I haven't found any documentation on this or seen this done before, but is
Actually haven't found the answer for this one. What for and why do i
Haven't fired up reflector to look at the difference but would one expect to
I haven't found a question on this topic so I'll ask. I've never actually
I haven't found any references to apps that use a custom activity indicator --
I haven't actually done this yet, and maybe I don't need to, but it
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I haven't seen this question anywhere else, I hope someone can help. I have

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.