SQL or UNICODE

SQL or UNICODE

Hi again............

I have got something new that...........

i was using MS Access as the database with my JAVA Japplet....

In my applet i used JTextArea to display the output .....
The output to display is fetched from the database which is connected using DSNless connection as with connection string...

My database contains two columns one with having ASCII and other With UNICODE

1]
when i trying to pass parameter to database i.e UNICODE and fetches ASCII it retrieves nothing to display

2]

when trying to pass parameter ASCII and fetches UNICODE it retrieves only [????] but exactly the same number of chars stored in DATABASE.......

acc. to me their is problem in SENDING and Retrieving the database bcz when trying to fetched ASCII it fetches the exact match and displays......

but with UNICODE nothing ......

I had also change my backhand to SQL SERVER but retrieves same for UNICODE [????] ..............

thanks
waiting for reply
View Answers

April 19, 2010 at 1:20 PM

Hi Friend,

In Access database, declare the data type 'Text' to both the fields.
You can use the following code to fetch the UNICODE value.

import java.sql.*;
import java.util.*;
class MSAccess{
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:access");
Scanner input=new Scanner(System.in);
System.out.println("Enter Ascii value: ");
String ascii=input.nextLine();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select UNICODE from Data1 where ASCII='"+ascii+"'");
if(rs.next()){
System.out.println(rs.getString("UNICODE"));
}
}
catch(Exception e){}
}
}

Hope that it will be helpful for you.
Thanks

April 20, 2010 at 6:46 PM

Ya i have Tried ..........


Can u make me sure THE UNICODE and ASCII are the columns nams......or something other

....................

thanks for posting reply........If u can contact me at [email protected] plz urgent.......needed

also can u tell me the method to use CLOB in java









Related Tutorials/Questions & Answers:
SQL or UNICODE - SQL
SQL or UNICODE   Hi again............ I have got something new... ...... I had also change my backhand to SQL SERVER but retrieves same for UNICODE... ASCII and other With UNICODE 1] when i trying to pass parameter to database i.e
UNICODE or SQL statement issue - JDBC
UNICODE or SQL statement issue  Hi again............ I have got... with having ASCII and other With UNICODE 1] when i trying to pass parameter to database i.e UNICODE and fetches ASCII it retrieves nothing to display 2
Advertisements
Unicode - JDBC
Unicode  hi i wanna retrieve Unicode values from the database...) or IN doc or RTF or WEB page it get the UNICODE as ????? what can i do so Language JAVA platform XP database SQL Server and MS ACcess
Java Unicode
Java Unicode  To insert Unicode word into MySql database using Java
Java Unicode
Java Unicode  To insert Unicode word into MySql database using Java
unicode - Swing AWT
unicode  hi i wanna retrieve Unicode values from the database...) or IN doc or RTF or WEB page it get the UNICODE as ????? what can i do so Language JAVA platform XP database SQL Server and MS ACcess
unicode characters
unicode characters  class Unicode { public static void main(String args[]) { char ch='\000a'; System.out.println("ch is:"+ch); } } on compilation this gives following errore:: CharLiteral6.java:5: error: illegal line end
unicode characters
unicode characters  class Unicode { public static void main(String args[]) { char ch='\000a'; System.out.println("ch is:"+ch); } } on compilation this gives following errore:: CharLiteral6.java:5: error: illegal line end
unicode characters
unicode characters  class Unicode { public static void main(String args[]) { char ch='\000a'; System.out.println("ch is:"+ch); } } on compilation this gives following errore:: CharLiteral6.java:5: error: illegal line end
unicode handling in java
unicode handling in java  reading a unicode text file in java
unicode
unicode
PDF Generation for unicode characters
PDF Generation for unicode characters  Hi, How a PDF file having unicode characters is generated in JSP
ModuleNotFoundError: No module named 'unicode'
ModuleNotFoundError: No module named 'unicode'  Hi, My Python... 'unicode' How to remove the ModuleNotFoundError: No module named 'unicode... to install padas library. You can install unicode python with following command
Java unicode - Java Beginners
Java unicode  I can read unicode character(malayalam language character) from a file but not able to print the character without installing a malayalam font(corresponding language font). Please help me to solve
Unicode - Java Beginners
Unicode  How to print unicode value of a char. Eg. /u0000 on console(default value of a char)  Hi Friend, Try the following code: import java.io.*; import java.util.*; public class Unicode { public static
Version of com.globalmentor>globalmentor-unicode dependency
List of Version of com.globalmentor>globalmentor-unicode dependency
ModuleNotFoundError: No module named 'docopt-unicode'
ModuleNotFoundError: No module named 'docopt-unicode'  Hi, My... named 'docopt-unicode' How to remove the ModuleNotFoundError: No module named 'docopt-unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'emoji-unicode'
ModuleNotFoundError: No module named 'emoji-unicode'  Hi, My... 'emoji-unicode' How to remove the ModuleNotFoundError: No module named 'emoji-unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'font-unicode'
ModuleNotFoundError: No module named 'font-unicode'  Hi, My Python... 'font-unicode' How to remove the ModuleNotFoundError: No module named 'font-unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyjavaproperties-unicode'
ModuleNotFoundError: No module named 'pyjavaproperties-unicode'  Hi...: No module named 'pyjavaproperties-unicode' How to remove the ModuleNotFoundError: No module named 'pyjavaproperties-unicode' error? Thanks  
ModuleNotFoundError: No module named 'unicode-babel'
ModuleNotFoundError: No module named 'unicode-babel'  Hi, My... 'unicode-babel' How to remove the ModuleNotFoundError: No module named 'unicode-babel' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'unicode-charnames'
ModuleNotFoundError: No module named 'unicode-charnames'  Hi, My... named 'unicode-charnames' How to remove the ModuleNotFoundError: No module named 'unicode-charnames' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'unicode_ids'
ModuleNotFoundError: No module named 'unicode_ids'  Hi, My Python... 'unicode_ids' How to remove the ModuleNotFoundError: No module named 'unicode_ids' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'unicode-mayo'
ModuleNotFoundError: No module named 'unicode-mayo'  Hi, My Python... 'unicode-mayo' How to remove the ModuleNotFoundError: No module named 'unicode-mayo' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'unicode-nazi'
ModuleNotFoundError: No module named 'unicode-nazi'  Hi, My Python... 'unicode-nazi' How to remove the ModuleNotFoundError: No module named 'unicode-nazi' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'unicode-please'
ModuleNotFoundError: No module named 'unicode-please'  Hi, My... named 'unicode-please' How to remove the ModuleNotFoundError: No module named 'unicode-please' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'unicode-slugify'
ModuleNotFoundError: No module named 'unicode-slugify'  Hi, My... named 'unicode-slugify' How to remove the ModuleNotFoundError: No module named 'unicode-slugify' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'unicode_tex'
ModuleNotFoundError: No module named 'unicode_tex'  Hi, My Python... 'unicode_tex' How to remove the ModuleNotFoundError: No module named 'unicode_tex' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'unicode_tr'
ModuleNotFoundError: No module named 'unicode_tr'  Hi, My Python... 'unicode_tr' How to remove the ModuleNotFoundError: No module named 'unicode_tr' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'winreg_unicode'
ModuleNotFoundError: No module named 'winreg_unicode'  Hi, My... named 'winreg_unicode' How to remove the ModuleNotFoundError: No module named 'winreg_unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'winreg_unicode'
ModuleNotFoundError: No module named 'winreg_unicode'  Hi, My... named 'winreg_unicode' How to remove the ModuleNotFoundError: No module named 'winreg_unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'winreg_unicode'
ModuleNotFoundError: No module named 'winreg_unicode'  Hi, My... named 'winreg_unicode' How to remove the ModuleNotFoundError: No module named 'winreg_unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'docopt-unicode'
ModuleNotFoundError: No module named 'docopt-unicode'  Hi, My... named 'docopt-unicode' How to remove the ModuleNotFoundError: No module named 'docopt-unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'emoji-unicode'
ModuleNotFoundError: No module named 'emoji-unicode'  Hi, My... 'emoji-unicode' How to remove the ModuleNotFoundError: No module named 'emoji-unicode' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'font-unicode'
ModuleNotFoundError: No module named 'font-unicode'  Hi, My Python... 'font-unicode' How to remove the ModuleNotFoundError: No module named 'font-unicode' error? Thanks   Hi, In your python
How java work on Unicode machanish
How java work on Unicode machanish   How the data are stored in java as unicode, how the conversions is done for input/output stream. Please describe in detail with memory aspect
Prinnt UNICODE character on swing component
Prinnt UNICODE character on swing component  Hello, I am trying to put unicode character n swing component. can anyone tell me how to do this? Thank you
Unicode - Java Beginners
SQL SERVER 2005) So please give me a proper solution fixed this issue
sql
difference between sql and oracle  what is the difference between sql and oracle
sql
sql  how to get first row in sql with using where condition in sql? how to get last row in sql with using where condition in sql
sql
sql  I want interview sql questions   Please visit the following link: SQL Tutorials
Conversion of unicode to its corresponding character
Conversion of unicode to its corresponding character  i have a string of unicodes e.g String s="\c0059\c0049\c3000" .. i need code for converting these unicodes to its corresponding alphabets.. pls if possible rep asap as i need
Sql
Sql  how to find maximum of a101,a102,a103 from a table in sql
ModuleNotFoundError: No module named 'doctest-ignore-unicode'
ModuleNotFoundError: No module named 'doctest-ignore-unicode'  Hi...: No module named 'doctest-ignore-unicode' How to remove the ModuleNotFoundError: No module named 'doctest-ignore-unicode' error? Thanks   Hi
ModuleNotFoundError: No module named 'normalize_cz_unicode'
ModuleNotFoundError: No module named 'normalize_cz_unicode'  Hi...: No module named 'normalize_cz_unicode' How to remove the ModuleNotFoundError: No module named 'normalize_cz_unicode' error? Thanks   Hi
ModuleNotFoundError: No module named 'normalize_cz_unicode'
ModuleNotFoundError: No module named 'normalize_cz_unicode'  Hi...: No module named 'normalize_cz_unicode' How to remove the ModuleNotFoundError: No module named 'normalize_cz_unicode' error? Thanks   Hi
ModuleNotFoundError: No module named 'tangled-up-in-unicode'
ModuleNotFoundError: No module named 'tangled-up-in-unicode'  Hi...: No module named 'tangled-up-in-unicode' How to remove the ModuleNotFoundError: No module named 'tangled-up-in-unicode' error? Thanks   Hi
ModuleNotFoundError: No module named 'tangled-up-in-unicode'
ModuleNotFoundError: No module named 'tangled-up-in-unicode'  Hi...: No module named 'tangled-up-in-unicode' How to remove the ModuleNotFoundError: No module named 'tangled-up-in-unicode' error? Thanks   Hi
ModuleNotFoundError: No module named 'unicode-slugify-latin'
ModuleNotFoundError: No module named 'unicode-slugify-latin'  Hi...: No module named 'unicode-slugify-latin' How to remove the ModuleNotFoundError: No module named 'unicode-slugify-latin' error? Thanks   Hi

Ads