نمایش نتایج 1 تا 6 از 6

نام تاپیک: اختلاف font در sql server 2000 و C#‎.net2005

Hybrid View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1

    Tick اختلاف font در sql server 2000 و C#‎.net2005

    سلام

    کدی که نوشتم وقتی در قسمت if تکست bind شده به combobox با رشته "زبان" مقایسه می شه جواب می ده ولی وقتی با رشته "انفورماتیک" یا "مدیریت" مقایسه می شه اتفاقی نمی افته و چون تمامی راههای ممکن رو امتحان کردم حدس می زنم که اشکال باید از تفاوت font های پایگاه دادم و متن کدی که در vs می نویسم باشه
    لطفآ راهنماییم کنین که چه کار باید بکنم.
    مرسی

    this.comboBox5.DataBindings.Add("Text", this.dviewmanager, "student.گروه_آموزشی");
    if (comboBox5.Text == "زبان")
    {
    comtxtC1 =
    "select * from english;";
    da =
    newSqlDataAdapter(comtxtC1, conn);
    ds =
    newDataSet();
    da.TableMappings.Add(
    "Table", "english");
    da.Fill(ds);
    conn.Close();
    this.textBox15.DataBindings.Clear();
    this.textBox19.DataBindings.Clear();
    this.dviewmanager = ds.DefaultViewManager;
    this.comboBox1.DataSource = this.dviewmanager;
    this.comboBox1.ValueMember = "english.نام_دوره";
    this.textBox15.DataBindings.Add("Text", this.dviewmanager, "english.کد_دوره");
    this.textBox19.DataBindings.Add("Text", this.dviewmanager, "english.گروه_درسی");
    }

    elseif (comboBox5.Text =="انفورماتیک")
    {
    comtxtC1 =
    "select * from anformatic;";
    da =
    newSqlDataAdapter(comtxtC1, conn);
    ds =
    newDataSet();
    da.TableMappings.Add(
    "Table", "anformatic");
    da.Fill(ds);
    conn.Close();
    this.textBox15.DataBindings.Clear();
    this.textBox19.DataBindings.Clear();
    this.dviewmanager = ds.DefaultViewManager;
    this.comboBox1.DataSource = this.dviewmanager;
    this.comboBox1.ValueMember = "anformatic.نام_دوره";
    this.textBox15.DataBindings.Add("Text", this.dviewmanager, "anformatic.کد_دوره");
    this.textBox19.DataBindings.Add("Text", this.dviewmanager, "anformatic.گروه_درسی");
    }

    در ضمن موقع کد نویسی (فقط در قسمت کد ونه در design برنامه) برخی کاراکتر ها مثل چ یا پ یا گ یا ژ بصورت ... می افتند.
    چه کار باید بکنم؟

  2. #2
    نقل قول نوشته شده توسط shirin_h مشاهده تاپیک
    سلام

    کدی که نوشتم وقتی در قسمت if تکست bind شده به combobox با رشته "زبان" مقایسه می شه جواب می ده ولی وقتی با رشته "انفورماتیک" یا "مدیریت" مقایسه می شه اتفاقی نمی افته

    سلام - مشکل شما حل نشده هنوز ؟!
    من فکر میکنم مشکل با حرف "ی" باشه. شما دقیقا چیزی رو که توی دیتابیس هست رو کپی کنید و توی شرط قرار بدید ببینید پاس میشه یا نه ؟
    ...مرا به خانه ام ببر، اگرچه خانه؛ خانه نیست

  3. #3
    نه هنوز حل نشده
    آخه از بس خوش شانسم هر چی error تو دنیا باشه سر من می یاد
    راه حل شما هم جواب نداد

  4. #4
    نقل قول نوشته شده توسط shirin_h مشاهده تاپیک
    در ضمن موقع کد نویسی (فقط در قسمت کد ونه در design برنامه) برخی کاراکتر ها مثل چ یا پ یا گ یا ژ بصورت ... می افتند.
    چه کار باید بکنم؟
    فکر میکنم مشکل مربوط به Collation دیتابیستونه
    فیلد مشکل دار از چه نوعی است و آیا از پیشوند "N" توی کوئریهاتون استفاده کردید یا نه ؟
    ...مرا به خانه ام ببر، اگرچه خانه؛ خانه نیست

  5. #5
    این مطلب ممکنه مفید واقع بشه :
    بنقل از : http://msdn2.microsoft.com/en-us/library/ms191200.aspx

    Using Unicode Data

    The Unicode specification defines a single encoding scheme for most characters widely used in businesses around the world. All computers consistently translate the bit patterns in Unicode data into characters using the single Unicode specification. This ensures that the same bit pattern is always converted to the same character on all computers. Data can be freely transferred from one database or computer to another without concern that the receiving system will translate the bit patterns into characters incorrectly.
    One problem with data types that use 1 byte to encode each character is that the data type can only represent 256 different characters. This forces multiple encoding specifications, or code pages, for different alphabets such as European alphabets, which are relatively small. It is also impossible to handle systems such as the Japanese Kanji or Korean Hangul alphabets that have thousands of characters.
    Each Microsoft SQL Server 2005 collation has a code page that defines what patterns of bits represent each character in char, varchar, and text values. Individual columns and character constants can be assigned a different code page. Client computers use the code page associated with the operating system locale to interpret character bit patterns. There are many different code pages and some characters appear on some code pages, but not on others. Some characters are defined with one bit pattern on some code pages, and with a different bit pattern on other code pages. When you build international systems that must handle different languages, it becomes difficult to pick code pages for all the computers that meet the language requirements of multiple countries and regions. It is also difficult to ensure that every computer performs the correct translations when interfacing with a system using a different code page.
    The Unicode specification addresses this problem by using 2 bytes to encode each character. There are enough different patterns (65,536) in 2 bytes for a single specification covering the most common business languages. Because all Unicode systems consistently use the same bit patterns to represent all characters, there is no problem with characters being converted incorrectly when moving from one system to another. You can minimize character conversion issues by using Unicode data types throughout your system.
    In SQL Server, these data types support Unicode data:
    • nchar
    • nvarchar
    • ntext
      Note: The n prefix for these data types comes from the SQL-92 standard for National (Unicode) data types.
    Use of nchar, nvarchar, and ntext is the same as char, varchar, and text, respectively, except that:
    • Unicode supports a wider range of characters.
    • More space is needed to store Unicode characters.
    • The maximum size of nchar columns is 4,000 characters, not 8,000 characters like char and varchar.
    • The maximum size for nvarchar columns, using the max specifier, is 2^31-1 bytes. For more information about nvarchar(max), see Using Large-Value Data Types.
    • Unicode constants are specified with a leading N: N'A Unicode string'.
    • All Unicode data uses the character set defined by the Unicode standard. Unicode collations used for Unicode columns are based on attributes such as case sensitivity, accent sensitivity, Kana sensitivity, width sensitivity and binary.
    ...مرا به خانه ام ببر، اگرچه خانه؛ خانه نیست

  6. #6
    ممنونم مشکلم حل شد
    نوع ستونم unicode بود راه حل copy paste کردنتون جواب داد
    کدمو پسو پیش نوشته بودم برا همین دیروز جواب نداد.
    مرسی

تاپیک های مشابه

  1. Link Server & Import Data In SQL Server 2000
    نوشته شده توسط A.Farzin در بخش SQL Server
    پاسخ: 3
    آخرین پست: شنبه 01 دی 1386, 13:53 عصر
  2. font در sql server
    نوشته شده توسط Hojat_ce در بخش SQL Server
    پاسخ: 5
    آخرین پست: دوشنبه 02 مهر 1386, 14:51 عصر
  3. ذخیره عکس از Asp.Net2005 در DB از نوع SQL Server 2000
    نوشته شده توسط rahele_sa در بخش Classic ASP
    پاسخ: 1
    آخرین پست: دوشنبه 08 آبان 1385, 10:45 صبح
  4. پیغام خطا پس از نصبSQL Server 2000 روی Windows Server 2003
    نوشته شده توسط ravanfar در بخش SQL Server
    پاسخ: 1
    آخرین پست: پنج شنبه 03 دی 1383, 23:41 عصر

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •