Inserting data into MySQL from .Net
-
Hi All, Actually I was't sure of which message board to choose. Anyhow, my problem is that I select arabic data from MySQL table into a DataTable in VS.net but when I try 2 insert the selected data, it inserts it as '???' though I chose the "utf-8"character set in connection string. It's just that when the records are fetched to .net table, they are transformed to "???" Any clue how 2 solve this?? Thnx a lot in advance
-
Hi All, Actually I was't sure of which message board to choose. Anyhow, my problem is that I select arabic data from MySQL table into a DataTable in VS.net but when I try 2 insert the selected data, it inserts it as '???' though I chose the "utf-8"character set in connection string. It's just that when the records are fetched to .net table, they are transformed to "???" Any clue how 2 solve this?? Thnx a lot in advance
Which version of mysql are you running? First make sure that you connection string looks like something like this: "Server={0}; Port={1}; Database={2}; Uid={3}; Pwd={4}; Charset=utf8;" In order to check if the actual records contain '???' or they are transformed into them after checking execute this query: SELECT HEX(column_name) FROM table_name; IF it displays 3f then the data itself is ???
-
Hi All, Actually I was't sure of which message board to choose. Anyhow, my problem is that I select arabic data from MySQL table into a DataTable in VS.net but when I try 2 insert the selected data, it inserts it as '???' though I chose the "utf-8"character set in connection string. It's just that when the records are fetched to .net table, they are transformed to "???" Any clue how 2 solve this?? Thnx a lot in advance
Hi I was have the same problem I solve it like this ...... -- My DataBase Charset was Latin_swidsh_c1 -- when I have to insert any word any recored in arabic I have to run this Query , it's like that Exactly....
set names cp1256
and when I found my old project I will write it exactly ... hope that will help you ... for now cause in the past I got sick of this problem but thank GOD it's solved now ... so I will search for you ... it's promise :) Have a good day ...I know nothing , I know nothing
-
Which version of mysql are you running? First make sure that you connection string looks like something like this: "Server={0}; Port={1}; Database={2}; Uid={3}; Pwd={4}; Charset=utf8;" In order to check if the actual records contain '???' or they are transformed into them after checking execute this query: SELECT HEX(column_name) FROM table_name; IF it displays 3f then the data itself is ???
I'm using mysql 4.1 The original data doesn't contain '?????' & yeah my connection string looks like u said :( Any clue?? Thanks a lot
-
Hi I was have the same problem I solve it like this ...... -- My DataBase Charset was Latin_swidsh_c1 -- when I have to insert any word any recored in arabic I have to run this Query , it's like that Exactly....
set names cp1256
and when I found my old project I will write it exactly ... hope that will help you ... for now cause in the past I got sick of this problem but thank GOD it's solved now ... so I will search for you ... it's promise :) Have a good day ...I know nothing , I know nothing
ok now here we go I will tell you exactly what I did to solve this just make sure that when you create the database it has latin1_swedish_ci Charset and the all other things are default , my replay before was for Php & MySql ......... ( set names cp1256 ) sorry have a good day
I know nothing , I know nothing