How to use non-Unicode mode in VB6 with ADO.
I'm using ADO on top of OraOLEDB to connect to Oracle 9.2. The database characterset is AL32UTF8. Since my client can't handle Unicode characters, I need a character conversion. However, arcording to the OraOLEDB document( which can be obtained here http://download-west.oracle.com/docs/cd/B10501_01/win.920/a95498/using.htm#1010255):
"How Oracle Unicode Support Works
OraOLEDB works in two modes, Unicode mode and non-Unicode mode. When the client character set is not a superset of
the server character set, OraOLEDB automatically enables the Unicode mode. In this mode, OraOLEDB stores the data in its cache in the UCS2 encoding scheme. The user should ensure that the database's character set is UTF8 in order to prevent any data loss.
If the client character set is a superset of the server's, the provider operates in the non-Unicode mode. This mode provides slightly better performance as it does not have to deal with larger character buffers required by the UCS2 encoding."
My client can only use NLS_LANG VN8VN3, which is NOT a superset of AL32UTF8, so "OraOLEDB automatically enables the Unicode mode". So if I code like this:
Text1.Font="Some Vietnamese Font"
Text1.Text= rs1.Fields("Name").Value
the display is bad ('?' all over the place). This is because rs1.Fields("Name").Type is adVarWChar, so rs1.Fields("Name").Value is encoded in UCS2. What I need is to make rs1.Fields("Name").Type is adVarChar, but it seems to be impossible since Field.Type is readonly.
When I use MS provider for Oracle, I found out that rs1.Fields("Name").Type is adVarChar, so Oracle do the conversion from/to AL32UTF8 (database character set) and VN8VN3(NLS_LANG) for me.
Since I use LOB and things that MS does not support, I want to use OraOLEDB, so anyone can help me out? It's ugent.
I can see that some 3rd program like SQLNavigator4.3 work well with NLS_LANG = VN3VN8 and DATABASE_CHARACTERSET=AL32UTF8 (i.e the program convert between the 2 characterset).
Please correct me if I misunderstood anything.
I need this ugently. Any help would be appreciated. If I don't make myself clear enough, please let me know.
Thanks in advance.
Thank you for your reply. I started to think that everybody is out on holidays...
The Oracle9i Client version is 9.2.0.1.0
Oracle Provider for OLEDB version is 9.2.0.4.0
Oracle Net version is 9.2.0.1.0, in case you need it.
The Oracle9i Database version is 9.2.0.1.0
But I don't think it is a version problem, is it?
Similar Messages
-
My Database characterset is AL32UTF8. In VB6, I have to use controls with some Vietnames fonts to display text. When I use MS Provider for Oracle, because it doesn't support Unicode, so if I set NLS_LANG to VN8VN3, the conversion always happens and I can happily do things like:
Text1.Font="Some Vietnamese Font"
Text1.Text= rs1.Fields("Name").Value
When I move on to OraOLEDB (to use LOB and advanced things Oracle provides), I found out that it will use Unicode mode in my case (because VN8VN3 is not a superset of AL32UTF8), so the rs1.Fields("Name").Value is encoded in UCS16 and I can't get it displayed in text boxes.
I found that I can use Oracle ODBC driver through MS Provider for ODBC, and unset "Force SQL_WCHAR for Varchar2 columnms" , but it seems to have some limits.
Any one can help me out?
Thank you very much.Maybe I didn't make myself clear enough.
I'm using ADO on top of OraOLEDB to connect to Oracle 9.2. The database characterset is AL32UTF8. Since my client can't
handle Unicode characters, I need a character conversion. However, arcording to the OraOLEDB document( which can be
obtained here http://download-west.oracle.com/docs/cd/B10501_01/win.920/a95498/using.htm#1010255):
How Oracle Unicode Support Works
OraOLEDB works in two modes, Unicode mode and non-Unicode mode. When the client character set is not a superset of
the server character set, OraOLEDB automatically enables the Unicode mode. In this mode, OraOLEDB stores the data in its
cache in the UCS2 encoding scheme. The user should ensure that the database's character set is UTF8 in order to prevent
any data loss.
If the client character set is a superset of the server's, the provider operates in the non-Unicode mode. This mode provides
slightly better performance as it does not have to deal with larger character buffers required by the UCS2 encoding.
My client can only use NLS_LANG VN8VN3, which is NOT a superset of AL32UTF8, so "OraOLEDB automatically enables
the Unicode mode". So if I code like this:
Text1.Font="Some Vietnamese Font"
Text1.Text= rs1.Fields("Name").Value
the display is bad ('?' all over the place). This is because rs1.Fields("Name").Type is adVarWChar, so
rs1.Fields("Name").Value is encoded in UCS2. What I need is to make rs1.Fields("Name").Type is adVarChar, but it seem to
be impossible since Field.Type is readonly.
When I use MS provider for Oracle, I found out that rs1.Fields("Name").Type is adVarChar, so Oracle do the conversion from/to
AL32UTF8 (database character set) and VN8VN3(NLS_LANG) for me.
Since I use LOB and things that MS does not support, I want to use OraOLEDB, so anyone can help me out? It's ugent. If I
don't make myself clear enough, please let me know.
Thank you very much. -
How to use non sap application in sap.......?
hi,
anyone has any idea how to use non sap application like java class in sap through abap programming. please let me know ...
thanks in advance.
saurin shah.Hi,
DATA: COMMAND TYPE STRING VALUE 'C:\j2sdk1.4.2_08\bin\java',
DIR TYPE STRING VALUE D:\eclipse\workspace',
PARAMETER TYPE STRING VALUE 'Helloworld'. "here the name of your java program
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
APPLICATION = COMMAND
PARAMETER = PARAMETER
DEFAULT_DIRECTORY = DIR
MAXIMIZED =
MINIMIZED = 'X' "If you need the DOS window to be minimized
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
BAD_PARAMETER = 3
FILE_NOT_FOUND = 4
PATH_NOT_FOUND = 5
FILE_EXTENSION_UNKNOWN = 6
ERROR_EXECUTE_FAILED = 7
OTHERS = 8.
check this link
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
Regards,
Satish -
How to Use SQL Query having IN Clause With DB Adapter
Hi,
I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
Thanksinvoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter
-
Req any examples of how to use a USB midi controller​/keyboards with Labview TIA
Req any examples of how to use a USB midi controller/keyboards with Labview TIA
Hi,
To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
= "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
Let me know if you have any further questions.
Regards,
Juan Carlos
N.I. -
How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013
How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013 there's two plugs do I use both for the safety to work or I just one ? Thanks sorry new macbook air 2013 was given to my daughter fir her 18th bday 2 days ago by my brother
No, the one is just an extension cord, just use the 45W charger with its attached thin cord and connect the magnetic magsafe to to the connector on the back left of the macbook Air for use and charging it
-
In SQLScript, how to use EXEC to call another procedure with parameters in procedure?
Hi experts,
In SQLScript, How to use EXEC to call another procedure with input and output parameters in procedure?thanks very muchHi Sagar,
thank you! I generate another procedure with an input parameter and an output parameter in a procedure. Then i need to call the generated procedure using EXEC. Here is my code:
create procedure ftest1(out sum_num bigint)
as
begin
declare fa_output bigint;
declare v_sql_drop varchar(200);
declare v_sql varchar(500);
declare cursor c_cursor1 for select num from TABLE1;
--v_sql_drop := 'drop procedure fe';
--exec v_sql_drop;
v_sql := 'create procedure fe(in i_num bigint,out o_num bigint) as begin';
v_sql := :v_sql || ' o_num := :i_num * 2 + :i_num * :i_num;';
v_sql := :v_sql || ' end';
exec v_sql;
open c_cursor1;
for c_item as c_cursor1 do
exec 'call fe(c_item.num,o_num=>fa_output)';
if sum_num is null then
sum_num := fa_output;
else
sum_num := :sum_num + fa_output;
end if;
end for;
close c_cursor1;
end;
The underline code is using exec to call the generated procedure. But this method cannot work. Any suggestion? thanks again! -
How to use Mac Mini Server as NAT with only one port??
How to use Mac Mini Server as NAT with only one ethernet port??
But why did apple sell me this server that does NAT with one port? I don't get it.
-
How to configure non-unicode in JVM of 1.4...
hii,
Plz explain me how configure non unicode bytes in JVM, ie SYSTEM PROPERTY set to false in JVM 1.4.1 & higher verison.
waiting for reply,
SantoshHey cross-poster,
This is the third time you posted this question, so I shouldn't really answer you..... but it's nearly Christmas and I'm bored at work.
Firstly, if you don't know the question, then you'll never get the answer.
Every string & character in Java is in Unicode.
Think of Java as a Unicode black box.
So to support other encoding schemes you must be able to read and write them out properly.
The default encoding scheme is determined by your PC's regional settings and architecture ( Windows/Unix/Mainframe for byte ordering )
You normally don't want to mess with that.
What I've done in the past to support arbitrary encoding schemes of text files and databases, is force the user to select the encoding scheme themselves then explicitely use it in my code.
Look at java.io.InputStreamReader, it accepts an "encoding scheme" parameter, eg "US-ASCII" or "ISO8859_8".
So you can read a text file, which is encoding in multi-byte format this way.
That should at least give you some direction to ask the real question you want.
regards,
Owen -
How to used the unicode in interface program in sap abap
hi expect,
can any body give example how to convert the non-unicode into unicode in a interface program.please help me.First check the connection with the source system. If its ok then replicate the datasource and activate. Then try with running job.
Time stamp error usually happens when source system in BI and r/3 side differs. -
Hi Team ,
We are planning 11.2.0.1 Grid infra rolling upgrade to 11.2.0.2 with out any downtime.
But while up gradation due to default scan port 1521 , 11.2.0.1 databases are not able to connect (remote connections)
We are using 1900 port for existing 11.2.0.1 grid infra scan.
While up gradation it is taking default port of 1521 insted of existing port 1900.
Please provide the solution to use non default port while 11.2.0.2 up gradation.
After upgrade the status as below.
grdoratst104:/apps/grid/grdhome:+ASM4> srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
Here I was getting TNS:no Listener errors from the client connections.
I have modifyed the scan port then it is working fine.
grdoratst104:/apps/grid/grdhome:+ASM4> srvctl modify scan_listener -p TCP:1800
grdoratst104:/apps/grid/grdhome:+ASM4> srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1800
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1800
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1800
grdoratst104:/apps/grid/grdhome:+ASM4>
Here the problem is we need to do the grid infra upgrade with out downtime,but due this default port issue clients are not able to connect to the database.
Thanks
Bala
Edited by: user12032334 on May 31, 2011 11:46 AMWhy are you using a non default port? It does not improve security. It makes network management more complex. And causes the type of issues that you are facing now.
So before changing defaults, make sure that your reasons are technically sound. And using port 1900 when 1521 is available, is not technically sound by any means.
As for addressing the problem you have created for yourself by mucking around with port numbers. Use a NAT firewall (on each RAC node) to rewrite packets headers received on port 1900 and send these to the server's port 1521 instead (on the VIP or static IP as required).
This can be fairly easily done using iptables if your o/s is Linux. You need to:
a) create a pre-routing NAT rule
b) create a post-routing NAT rule
c) create a forwarding filter rule for port 1900/tcp
d) create an input filter rule to accept traffic on 1900/tcp -
How to use Real time execution trace toolkit with Dual-core processor??
hi there
the situation as follows:
i have a computer (PC and Laptop) types with Dual-core processors, and am trying to do simulation using Multi-core technology and based on different simulation scenarios...starting from sequantial processing,.......Piple lining processing strategy. so that i can differentiate the time delay between those types of processing based on (Using 1 processor then dual-core processor Computers)
my question is: As i read through Ni's white papers i saw many notes refer to Real-time execution trace toolkit to investigate the (processing-time , etc) of multi-core processors in processing diffenent algorithms. My algorithms are to be run on 1 computer with dual-core processor BUT, not in real time environments, that is ( No hardware to be connected to my pc) only algorithms running on my pc....
So, is it possible to use Real time execution trace toolkit or anyother tools in LabVIEW to show processing-delays and/or anyother timing critical issues without using my application for real- time hardware.???
in other words: how to use Real time execution trace toolkit in non-hardware and/or real-time scenarios???
please help me in this.
Any suggestion, comments, feedback.....is absolutely highly appreciated
thanks a lot in advance
Labview LoverHey,
The Realtime Execution Trace Toolkit only works for NI RT Targets.
But you can use the Desktop Execution Trace Toolkit, just search for it under ni.com.
Christian -
How to use old "Apple Loops for Soundtrack" with Garageband
Since Soundtrack (was part of FinalCut Express HD) doesn't work anymore (since some ProKit framework update) and was not part of the FinalCut Express 4 upgrade I used Garageband for sound creation and editing. But I missed some good loops from the old Soundtrack.
The Apple Loops for Soundtrack were still sitting on my harddisk but Garageband didn't recognize them in the Loop-Browser. Looking at the structure I found the Search Index files (/Library/Audio/Apple Loop Index/). I have two there, one for Garageband and another for iLife Sound Effects. Both are interpreted by Garageband. But no third for the old Soundtrack Loops. So I had a look at the Sound Loops installer DVD from FinalCut HD and there I found a similar structur and copied the Index file to the location of the two indexes mentioned above. I left the Loops for Soundtrack where they are (also could edit the index file for new locations, but that's a 7.5MB text file) and now Garageband knows their location and also lists the loops at the right categories inside the Loop-Browser.
Maybe that helps someone, even if I didn't find a topic about it here.Ah.. ok, then never mind. Just didn't find any information about how to use the old soundtrack loops with garageband and so I did some thinking on my own. And if it works that easy, the better it is
-
How to use shortcut keys on wireless keyboard with ipad
i just purchased an ipad 4 with a wireless keyboard and do not know how to use the function keys on the wireless keyboard to access the homescreen, scroll up and down, etc. please help with anything i need to turn on/off or download . thanks
If you have more than one keyboard active, you may be using a different one than you want. Use the "globe" key to make sure your virtual keyboard is set to Japanese Romaji or Japanese Kana. Which one do you use?
On the hardware keyboard, use apple/command plus space to switch between different keyboard layouts which may be active. -
How to use SQl server 2005's SQLXMLBulkLoad with JAVA
Hi All,
I am in a big problem identifying how to use xml bulk insert functionality of sql server 2005 with java.
I need to enter millions of data into the sql server 2005 database.
All the material i saw on net includes vb script or asp.net sripts to do so.
Somebody please tell how I can do this with JAVA.
Thanks.In this forum we commonly discuss connections from Oracle to foreign databases. When you want to connect with your SQL Server to Oracle it would be better to ask that in a Microsoft forum as they support their LINKED SERVER mechanism.
The linked server set up is for example described in the Microsoft knowledge base as:
280106 - HOW TO: Set Up and Troubleshoot a Linked Server to Oracle in SQL Server
In newer SQl Server releases the name changed see for example:
How to run a SQL Server 2005 Integration Services package as a SQL Server Agent job step
View products that this article applies to.
Article ID : 912911
As you can see they are commonly using OLEDB driver. So you might have to install Oracle's OLEDB driver as well. Else you might think about using OLEDB to ODBC bridge
Maybe you are looking for
-
Error while processing data packets
I am getting following error while processing into Further processing. "Request REQU_4B76NS5NMRU1Z4QONVEFRYTGI , data package 000526 incorrect with status 9" Diagnosis Request REQU_4B76NS5NMRU1Z4QONVEFRYTGI , data package 000526 contains errors w
-
Error when trying to running application
Hi, I am completley new to SAP netweaver so please forgive my ignorance. First I installed SAP Composotion Environment and SAP Netweaver 7.1 both on XP Professional (Service Pack 2). They both installed succesfully. I then created a sample EJB applic
-
So like it's on my iPod but i can't open it it just says underneath the name it says " wait.. " plus I just got this like a month or 2 ago & it also freezes alot. What can i do about it freezing & the app?? It's the 4th generation & the app says that
-
Good device to put Instance root directory on a SQL Server 2012 Always On Failover Cluster ?
Hello, I'm currently testing SQL Server 2012 AlwaysOn Failover Cluster. I wonder if I installed it correctly : I installed the software on both server with the instance root directory set to a directory on a cluster shared module. The reason why I'm
-
How to customise the Period dimension in Hyperion planning
Hi Guru's We are using Hyperion Planning 11.1.2.2 We have an requirement to customise the period dimension as follows, -Period -HalfYear1 -Q1 -Q2 -HalfYear2 -Q3 -Q4 How to add HalfYear in the period Dimension.