.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Unicode data insertion in MySql

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net


I am trying to insert Unicode data  in a table of MySql which I have set for UTF-8 general ci. The problem is when I insert the row into the table using Asp.net application. It shows ???? instead. If I copy the string from the debug mode and paste that in Mysql. it also shows the same problem.

But when I type the insert command in Mysql Query Browser and put each fields value individually in insert statement, it works. 

Can someome solve that problem. what Asp.net formats extra so that it shows ????

Thanks & best Regards

Jay Khatri

View Complete Post

More Related Resource Links

datarow data insertion error


this is the code which i am using and what i want means when i==0 first record should bind to datatable and when i==1 2nd record should bind to datatable. that means when i==1 1st and 2nd record should be present in datatable  Please see the code below


when i am binding 2nd record to datatable 1st record is getting deleted and recently inserted value is getting inserted please tell me how to resolvie this


datatable dt11=new datatable();
DataRow row11=null;

if (i == 0)
row11 = dt11.NewRow();

row11["qid"] = qnumber;

row11["question"] = question;
row11["useranswer"] = correctans;
row11["flag"] = answerstatus;


if (i == 1)

qnumber =ds5.Tables[0].Rows[i][0].ToString();
question =ds5.Tables[0].Rows[i][1].ToString();

row11 = dt11.NewRow();

Saving textbox data to MySql database in asp.net


Hi dear coders

though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click.

i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in asp.net

i will be highly thankful for any kind help from you geniuses.



MySql.Data assembly problem



I added refernece MySql.Data to my project. My web.config looks like that:

<?xml version="1.0"?>
                <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

But when in ServerExplorer I try "Add Connection..." I can't find "MySql Database" in the "Choose Data Source" dialog box?

What the problem can be?

mysql data source provider - mysql connector/net

Dear All, I having problem installing mysql connector/net 6.2.3 on my vsd 2010 because the installed went smoothly but when Im trying to use the mysql on data source provider, I cant see it on the list and when try to install/change the connector the visual studio integreation has an x mark meaning to say it was not installed on my vsd2010.  Thanks.

ASP.NET insertion and joining data between tables

I have the following tables:1.) PRODUCT_INFORMATION2.) CUSTOMERS3.) DISTRIBUTORS4.) PRODUCT_NAME5.) CONTROLLEREach table has a primary key assigned. The customers table has an ID column and a CUSTOMER_NAME column with unique index property set to avoid any duplication. How do I insert values in the product_information table that has a foreign key column from the CUSTOMERS table if we insert a value in the CUSTOMER_NAME field of the CUSTOMERS table. I want to know how can I create a join between all the tables so that when I insert values in individual tables they are joined with a serial number column in the PRODUCT_INFORMATION  table?Please suggest!!

Unable to prepare the SSIS bulk insert for data insertion

Hi,   I am using SQL Server Destinations in my data flow tasks. I'm running this package in the server until i encountered this error:   OnError,,,LOAD AND UPDATE Dimension Tables,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion. OnError,,,Load Dimensions,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion. OnError,,,Discount Reason, ISIS Condition, ISIS Defect, ISIS Repair, ISIS Section, ISIS Symptom, Job Status, Parts, Purchase SubOrder Type, Service Contract, Service Reason, Service Type, TechServiceGrp, WarrantyType, Branch, Wastage Reason,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1073450974,0x,SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Dim_T_ISISDefect" (56280) failed with error code 0xC0202071. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure. What could be the reason for this? I don't usually have an error.   cherriesh

SQL ServerDestination error - Unable to prepare the SSIS bulk insert for data insertion.

Having searched the forum, this one clearly has form... However beyond assisting those who have fallen at the first hurdle (i.e. forgetting/not knowing that they cannot execute the package remotely to the instance of SQL Server into which they are inserting), the issues raised by others have not been addressed. Thus I am bringing nothing new to the table here - just providing an executive summary of problems which others have run into, written about, but not received answers for.   First the complete error: Description: Unable to prepare the SSIS bulk insert for data insertion.  End Error  Error: 2008-01-15 04:55:27.58     Code: 0xC004701A     Source: <xxx> DTS.Pipeline     Description: component "<xxx> failed the pre-execute phase and returned error code 0xC0202071.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  4:53:34 AM  Finished: 5:00:00 AM  Elapsed:  385.384 seconds.  The package execution failed.  The step failed.   Important points It mostly works - It produces no error more than 9 times out of 10. It fails on random dataflows - My package has several dataflows, (mostly) executing concurrently. Where the error occurs it does not do so on the same dataflow each time: on one run it'll fail on dataflow A whilst B,C,D and E succeed, then A-E will all succeed (and continue doing so for the next ten runs thereafter), and

automatic insert data to mysql table

hi all,             Actually i need to transfer data from one table to another table in mysql with codition of Time.for example i need to transfer data at 10.00am when user login at 10.00am it must be insert into another data table.. if anybody know time control  please reply me..C#Thank You,Arunabathan.G

automatic transfer data from one table to another table in mysql.

Hi all,         i done one web application in this application i need to transfer the data from one table to another automatically when the time is 10.00PM. i need to write this function sepearte time function not in page load function.the user select any of page the data should be transfer from one to another without page load only using time control function.. if anybody know this ,please reply me.Thank You,Arunabathan.G

I don't see unicode data in .vcf file in c# .net

Hi ,   I developed the application in c# that create & write a Vcard file using StreamWriter or BinaryWriter but i open vcf file the name field cannot display the unicode characters correctly..   For example This  "Gabriele Tögl" display as "Gabriele T?gl"   I tried encoding UTF8 & UTF7,UTF32 but it fails.

Namespace 'MySql.Data.MySqlClient' cannot be found.

Hey Guys. I'm having some really annoying issue using ADO.NET connector. I've added reference to my project- the file "MySQL.data.dll" Actually, i've copied the file from "MySQL Connector Net 6.2.2\Assemblies" to "MyWebSite\bin" and then added reference. Then, typed "using MySQL.data" and as you can guess, i've got that message: Namespace or type specified in the Imports 'MySql.Data.MySqlClient' cannot be found. What am i doing wrong? thanks ahead  

for ajax data insertion in page what is faster than innerHTML ?

I m doing an ajax work where web service will return data and on client side and I am creating html table with data. I am using var (to hold string of generated html code), do string concatinations to generate table, tr and td tags and put data in it. Than I put this html table with data into a div using innerHTML. Please note I am applying inline css in this dynamic html code. The issue I am facing is web service will return a huge amount of data. What I tested is even on local machine it took about 10-12 minutes to process (concatinating, creating tags putting data in table, applying css) 10000 rows. Stored procedure just take 3-4 seconds in returning data. Please guide me how this inbrowser processing time can be reduced ? I am doing it for speed in some wrong way ? Or is there some technique for it or some method faster than innerHTML and string concatinations ? thanks

Inserting images into mysql data using c#

hey dere,is dere any way that i can store or insert  images into the mysql database and retrieve them successfully just like textual data.thnks in advance...

Godaddy.com and MySql.Data.dll problems.

I posted this on the 'Hosting Open Forums', but didn't get any answer so I'll try again here...   I have a .NET 2.0 application that is hosted on Godaddy.com.  When you setup your MySQL database, Godaddy supplies you with several connection strings, depending on the connector you wish to use (ODBC, OLEDB, and MySQL Connector .NET). Since they provide a connection string for Connector .NET, I assume this means I could use this connector to access MySQL, and from what I read, doing so would be preferable to using ODBC or OLEDB. I setup my page and plopped the MySql.Data.dll into my bin directory as suggested.  Since Godaddy sets the trust level to medium on shared hosts, I got the following error (I've seen many people bring up this problem due to running under a medium trust level in .NET 2.0):  System.Security.SecurityException: That assembly does not allow partially trusted callers. So, I did some research and it was suggested that if you add [assembly:AllowPartiallyTrustedCallers] to AssemblyInfo.cs in the MySql Connector .NET source, recompile, then use the new .dll, the trust issue will be resolved. I did this and placed the new .dll in my /bin folder and although the original error went away, I now get the following error:  MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts ---> System.Security.Se

Can I create an ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?


Can I create  an  ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?

If yes, are there any documentation or tutorials?


How do you create a ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?


Can I create a ADO.Net Entity Data Model for a MySql(5.0.1) Database using a Visual Web Express 2010? If yes, can anyone please let me know how to do this.

Incremental data load from MySQL database to SQL server 2008 using SSIS


I am looking for best solution to perform incremental data load from MySQL database to SQL Server 2008.  I tried to follow instructions from articles on incremental data load in SSIS  using MD5 hashes but I failed to make connection in Lookup transformation editor between MySQL Id (4 byte unsigned integer) and Id in SQl Server 2008 table which is  bigint. i tried to add  data conversion and convert MySQl Id to string. It works fine when you map this field directly to OLEDB destination but in Lookup component it failed. 


Any input greatly appriciated.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend