Java insert proc: - storedProc = conn.prepareCall("{call SMSC.p_smsu_campaign_insert(?,?,?,?,?,?)}");
-
storedProc.setString("Campaign_name", campaign);
-
storedProc.setString("Used_OA", OA);
-
storedProc.setInt("RefNum", 1);
-
storedProc.setString("Send_Start", df.format(new java.sql.Date(startSend)));
-
storedProc.setString("Last_VP", df.format(new java.sql.Date(EndDate.getTime() + validity_period)));
-
storedProc.setString("Created", df.format(new java.sql.Date(System.currentTimeMillis())));
-
storedProc.execute();
DB insert proc: - create or replace procedure P_SMSU_CAMPAIGN_INSERT (
-
Campaign_name in nchar,
-
Used_OA in char,
-
RefNum in number:=1,
-
Last_VP in char,
-
Send_Start in char,
-
Created in char
-
) is
-
begin
-
insert into Campaigns (Campaign_name, Used_OA, RefNum, Last_VP, Send_Start, Created)
-
values (Campaign_name, Used_OA, RefNum,
-
to_date(Last_VP, 'YYYY-MM-DD HH24:MI:SS'),
-
to_date(Send_Start, 'YYYY-MM-DD HH24:MI:SS'),
-
to_date(Created, 'YYYY-MM-DD HH24:MI:SS')
-
);
-
end P_SMSU_CAMPAIGN_INSERT;
DB table: - create table CAMPAIGNS
-
(
-
CAMPAIGN_NAME NVARCHAR2(100) not null,
-
USED_OA CHAR(67),
-
REFNUM NUMBER not null,
-
LAST_VP DATE not null,
-
SEND_START DATE not null,
-
CREATED DATE default sysdate not null
-
)
DB select proc: - create or replace procedure P_SMSU_BULK_SUMMARY_STATUS
-
(
-
RCT1 OUT GLOBALPKG.RCT1,
-
ReportTimestamp in Timestamp:=null
-
) is
-
-
begin
-
open rct1 for
-
SELECT c.campaign_name, c.used_oa, c.created, c.send_start, c.last_vp
-
FROM CAMPAIGNS C
-
where (ReportTimestamp between c.created and c.last_vp) or ReportTimestamp is null;
-
end P_SMSU_BULK_SUMMARY_STATUS;
java fetch: - storedProc = conn.prepareCall("{call SMSC.P_SMSU_BULK_SUMMARY_STATUS(?,?)}");
-
storedProc.registerOutParameter("RCT1", OracleTypes.CURSOR);
-
storedProc.setTimestamp("ReportTimestamp", forTime);
-
storedProc.execute();
-
ResultSet result = (ResultSet) storedProc.getObject("RCT1");
-
return ResultSupport.toResult(result);
java display: - Object[][] rows = fetch().getRowsByIndex();
-
for (int i = 0; i < rows.length; i++)
-
{
-
out.println("<tr>");
-
for (int k = 0; k < rows[i].length; k++)
-
out.println("<td>" + encodeHTML(rows[i][k].toString()) + "</td>");
-
out.println("</tr>");
-
}
and in the campaign name column I get "¿etvrti test ¿¿¿¿¿ ¿¿¿¿¿" instead of "četvrti test šđčćž ŠĐČĆŽ" (which I entered). Function encodeHTML gets crap as parameter, so html encoding is not the problem.
Platform ojdbc1.4 + oracle10g. What am I doing wrong?
3 2166 JosAH 11,448
Recognized Expert MVP
and in the campaign name column I get "¿etvrti test ¿¿¿¿¿ ¿¿¿¿¿" instead of "četvrti test šđčćž ŠĐČĆŽ" (which I entered). Function encodeHTML gets crap as parameter, so html encoding is not the problem.
Platform ojdbc1.4 + oracle10g. What am I doing wrong?
The ASCII characters come through fine. My guess is that the font you're using
can't display the glyphs (shape) of the non-ASCII characters. Try the Arial MS
Unicode font (if you have it installed) for starters.
kind regards,
Jos
It is not that. When I check the received string in the debugger, it contains crap characters (code point 191), and they get displayed properly (with inverted question mark)
I have rechecked, and crap characters are stored in database, so the insertion part skrews up.
At the statement - storedProc.setString("Campaign_name", campaign);
variable campaign contains correct string (netbeans debugger displays it correctly).
Also, when I access db from Visual Studio (either direct access to table or through insert procedure), everything is fine!
Java part correctly shows unicode characters inserted/modified by program written in Visual Studio! So, I have narrowed the problem to the insertion part: - storedProc = conn.prepareCall("{call SMSC.p_smsu_campaign_insert(?,?,?,?,?,?)}");
-
storedProc.setString("Campaign_name", campaign);
-
storedProc.setString("Used_OA", OA);
-
storedProc.setInt("RefNum", 1);
-
storedProc.setString("Send_Start", df.format(new java.sql.Date(startSend)));
-
storedProc.setString("Last_VP", df.format(new java.sql.Date(EndDate.getTime() + validity_period)));
-
storedProc.setString("Created", df.format(new java.sql.Date(System.currentTimeMillis())));
-
storedProc.execute();
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sudha |
last post by:
I have an asp application in asp that should support languages like japanese,
french, chinese, malay and english. I am using the characterset as iso-8859-1
in the html meta tag. Most of the characters are getting stored in the
unicode format. But there are few characters in french, japanese and chinese
that are not getting stored properly....
|
by: Andrew Arace |
last post by:
I scoured the groups for some hands on code to perform the menial task
of exporting table data from an Access 2000 database to Oracle
database (in this case, it was oracle 8i but i'm assuming this will
work for 9i and even 10g )
No one had what I needed, so I wrote it myself.
I Rule.
This code isn't going for efficiency, and isn't trying...
|
by: Ram |
last post by:
Hey,
I'm trying to execute an Insert SQL command, where one of the parameters I'm
trying to insert, has some unicode characters.
The execute command gives no error, but when I use Nevigator to see the new
line,
Alll the unicode characters have been misteryously converted to - "?" !!!
I'v tried every known Oracle Provider - ADO 2.7,...
|
by: RobertoP |
last post by:
Hello,
I am trying to create a simple Oracle application that queries some data
from Oracle. The problem is that it randomly returns trailing \0s instead of
the characters of a string.
Instead of:
NIC, returns sometimes as N\0\0
188524C-01, returns somtimes as 18852\0\0\0\0\0
|
by: RobertoP |
last post by:
Hello,
I am trying to create a simple Oracle application that queries some data
from Oracle. The problem is that it randomly returns trailing \0s instead of
the characters of a string.
Instead of:
NIC, returns sometimes as N\0\0
188524C-01, returns somtimes as 18852\0\0\0\0\0
| |
by: Ram |
last post by:
Hey,
I'm using VB.NET and I'm trying to execute SQL Command,
Where one of the parameters I'm trying to insert, has some unicode
characters.
The execute command gives no error, but when I use Nevigator to see the new
line,
Alll the unicode characters have been misteryously converted to - "?" !!!
I'v tried every known Oracle Provider - ADO...
|
by: shaguna.dhall |
last post by:
I need to migrate Unicode data from MS Access to Oracle. Have tried the
following:
-Exported the Access tables to csv/txt, but these files were generated
in ANSI encoding, and the Unicode data got converted to ASCII
characters.
-ODBC export directly to the Oracle tables doesn't work either.
-However, when the table is exported to excel,...
|
by: dzenanz |
last post by:
Calling a stored procedure from Java with ojdbc 1.4 corrupts (converts to ¿) unicode characters that are not contained in DB's current charset.
Calling this proc from C# works as expected (all unicode characters are properly stored).
String driver = "oracle.jdbc.OracleDriver";
Class.forName(driver);
DriverManager.registerDriver(new...
|
by: Server Applications |
last post by:
Hello
I am trying to build a system where I can full-text index documents with
UTF8 or UTF16 data using Oracle Text. I am doing the filtering in a
third-party component outside the database, so the I dont need filtering in
Oracle, but only indexing.
If I put file references to the filtered files in the database and index
these (using...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |