Question : mysql utf8

my db al set as utf8.
till now i was importing txt files with no problem...i was saving them as utf8 uncoding and it was uploaded all fine...

i tried to do same with excel, i saved as>tools>utf8 encoding>ok...
but all i get inside the db is ?????

i thought may be to try "CONVERT" function
buti never used it + don't know how to use it with "insert" query...
http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html

heeelp
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
<%
Set oConn = Server.CreateObject("ADODB.connection")
oConn.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ=" &  Server.Mappath("050208.xls") & ";"
 
Set RS=Server.CreateObject("ADODB.Recordset")
 
RS.open "SELECT * FROM [sheet1$]", oConn
 
 
dim mySQL, conntemp, rstemp
do until RS.EOF
      mySQL="INSERT INTO users (uname,subid) VALUES ('" &RS.fields(0)& "','" &RS.fields(1)& "')"
      call updateDatabase(mySQL, rstemp, "addsxe.asp")
      RS.movenext
Loop
 
 
 
RS.Close
oConn.Close
Set RS = Nothing
Set oConn = Nothing
%>

Answer : mysql utf8

in your code snippet above...
     mySQL="INSERT INTO users (uname,subid) VALUES ('" &RS.fields(0)& ...
just output RS.fields(0)....

:)
Random Solutions  
 
programming4us programming4us