Data truncation when using resultset.getString() to a char type field
In my table ,there is a char type field,such as a char(4) field, for multilanguage use,I put two "double-byte" character in it,
when I using resultset.getString() to this char type field,I can't get the right result,one char was truncated, so I only get three char, for "double-byte" it 's error code
this only happen on IBM JVM on AIX 5 , when I use oracle jdbc on windows hotspot vm , it works fine (we use the same oracle on AIX)
is there any further setting for JDBC driver on AIX ? but it 's thin driver
and the varchar type works fine at any paltform
any help ?
Hi jul!!!
write like this:
DATA : wa_flight_data TYPE bapisfldat,
wa_add_info TYPE bapisfladd,
wa_availability TYPE bapisflava,
it_ret TYPE STANDARD TABLE OF bapiret2,
wa_ret TYPE bapiret2.
PARAMETERS : pa_carr TYPE sflight-carrid,
pa_conn TYPE sflight-connid,
pa_date TYPE sflight-fldate.
CALL FUNCTION 'BAPI_FLIGHT_GETDETAIL'
EXPORTING
airlineid = pa_carr
connectionid = pa_conn
flightdate = pa_date
IMPORTING
flight_data = wa_flight_data
additional_info = wa_add_info
availibility = wa_availability
TABLES
*EXTENSION_IN =
*EXTENSION_OUT =
return = it_ret.
write : / 'Flight Data: ',
wa_flight_data-AIRLINEID,
wa_flight_data-AIRLINE,
wa_flight_data-CONNECTID,
wa_flight_data-FLIGHTDATE,
wa_flight_data-AIRPORTFR,
wa_flight_data-CITYFROM,
wa_flight_data-AIRPORTTO,
wa_flight_data-CITYTO,
wa_flight_data-DEPTIME,
wa_flight_data-ARRTIME,
wa_flight_data-ARRDATE,
wa_flight_data-PRICE,
wa_flight_data-CURR,
wa_flight_data-CURR_ISO.
similaryly for wa_add_info and wa_availability.
becoz u r using work area directly in WRITE statement and
wa_flight_data TYPE bapisfldat,
wa_add_info TYPE bapisfladd,
wa_availability TYPE bapisflava,
contains both int and char data so u can print all of them together..They can be printed field by field.
if any doubts..let me knw.
hope it helps.
kindly rewrd.
Similar Messages
-
Can we set the dynamic data source when using getReportParameters() ?
Hello!
I have a report where one of its parameters refers to a list of values (LOVs). This list of values is an SQL Query type. When the data source used in the report is defined in the BI Publisher server, I'm able to get the report parameters using the getReportParameters() function in my application. However, if the data source is not defined the function throws an exception, which is understandable.
I decided to dynamically set the data source so that even if the data source used by the report is not defined in the BI Publisher server, it still will be able to get the LOVs for the parameter. I tried setting the JDBCDataSource of the dynamicDataSource for the ReportRequest object that I passed to the getReportParameters() function. Please see the sample code below:
reportRequest.dynamicDataSource = new BIP10.BIPDataSource();
reportRequest.dynamicDataSource.JDBCDataSource = new BIP10.JDBCDataSource();
setReportDataSource(reportRequest.dynamicDataSource.JDBCDataSource, connectstr, jdbc, dc); //function to set the values for JDBCDataSource object
reportParams = webrs.getReportParameters(reportRequest, uid, pwd); //call the getReportParameters
I was expecting this to work as this is what I did to dynamically set the data source before calling the runReport function. So, my question is -- can we set the dynamic data source when using getReportParameters() ? I tried this both in versions 10g and 11g. It does not seem to work on both versions.
Regards,
Stephaniereport_id column of apex_application_page_ir_rpt can help us uniquely identify each saved report.
We can assign this report_id value to a page item and this page item can be put in the Report ID Item text box of the Advanced section of the Report Attributes page of the IR.
This should load the saved report identified by report_id and you can get rid of javascript
Regards,
Vishal
http://obiee-oracledb.blogspot.com
http://www.packtpub.com/oracle-apex-4-2-reporting/book
Kindly mark the reply as helpful/correct if it solves your problem -
How to totally turn off data traffic when using ma...
Nokia N8-00:
I only use the integrated gps and have turned off the assisted gps, net based gps and Wi-Fi/Network but when accessing maps it still generates data traffic.
Normally this is´nt a problem but when traveling abroad data traffic costs a small fortune.
In my old N95 when I downloaded offline maps and turned everything but integrated gps off there was no data traffic at all but even after the latest maps updates (i.e. yesterday) it appears that the maps still needs downloading when accessed...
Any suggestions how to completely avoid data traffic when using maps?Set all destinations to always ask and select no whenever the phone gives you a request, set Maps to offline, and set location to just use intergrated GPS. By the way, just been to Portugal using Vodafone and data charges only about £5 for week, and they've just improved allowances, may be worth checking your service providers web site and see if it's necessary to bother about data roaming, they all tend to follow each other, and Data roaming charges in europe seem to be coming down !
If I have helped at all, a click on the White Star is always appreciated :
you can also help others by marking 'accept as solution' -
Why select data from Function directly (SE37) got data , but when use funct
why select data from Function directly (SE37) got data , but when use function in program donot found data
i use function
CS_BOM_EXPL_MAT_V2
when i run function directly at SE37 .
i found data.
but when i use same function in program .
system not found.
please see my attachment.
help me please.
[http://www.quickfilepost.com/download.do?get=c974356a498b3a4d369aa0c50622e50b]
http://www.quickfilepost.com/download.do?get=c974356a498b3a4d369aa0c50622e50bI know why U get empty data.
In Program U should follow the rules:
U'd better data a variant typed the function parameters's type.
for example:
in your program the parameter: stlal = '1'
U'd better like follow:
Data l_stlal type STKO-STLAL
l_stlal = '01'. *Attention: '1' <> '01'.
stlal = l_stlal.
in this way U may have less mistake
and the parameter MTNRV
U should use material convernt : "CONVERSION_EXIT_MATN1_INPUT" to change material into internal types before U put into function's parameter.
why se37 has no problem? because In se37, the data you filled was be processed before use -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
I have created a farm solution and then i deploy it to SharePoint server, the code looks as follow, and i use it to update a page info values (as the current page values represents old info):-
[ToolboxItemAttribute(false)]
public partial class VisualWebPart1 : WebPart
// Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
// the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
// for production. Because the SecurityPermission attribute bypasses the security check for callers of
// your constructor, it's not recommended for production purposes.
// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
public VisualWebPart1()
protected override void OnInit(EventArgs e)
base.OnInit(e);
InitializeControl();
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
using (SPWeb web = site.OpenWeb())
SPList list = web.Lists["Pages"];
web.AllowUnsafeUpdates = true;
foreach (SPListItem items in list.Items)
items["Author"] = "SharePoint";
items["Created"] = "01/08/2014 01:44 PM";
items.Update();
list.Update();
web.AllowUnsafeUpdates = false;
protected void Page_Load(object sender, EventArgs e)
but when i try adding this web part to a page i got the following error:-
Invalid data has been used to update the list item.The field you are trying to update may be read only
so can anyone advice?i only changed lines bitween
web.AllowUnsafeUpdates = true;
and
web.AllowUnsafeUpdates = false;
and other parts of code remains without change
so it will updates all pages in current web
yaşamak bir eylemdir -
How can I use jbo:InputSelect for a char type filed?
How can I use <jbo:InputSelect for a char type filed?
I have two tables. One is room (primary key is room(type is char)), another table is responsibility (foreign ker is room(type is char)). Both tables have same length for room column.
There is a problem:
If I use (in the "DataEditComponent.jsp" file)
<jbo:InputSelect multiple="false" datasource="dsEdit" displaydatasource="roomData" displaydataitem="ROOM" displayvaluedataitem="ROOM" ></jbo:InputSelect>
to get the room input for responsibility from combobox(Datasource roomData is from room table). In the form the room field cannot bind the data in combobox, alway select the first item. And if I select one item and click the update button.There is an error message:
Error Message: JBO-27010: Attribute set with value H409 for Room in Responsibility has invalid precision/scale
I found If I changed the field type from char to varchar2 in database also change the entity objects, it works well. I wonder if there are any diffrence using <jbo:InputSelect tag in char and varchar2 type. How can I use <jbo:InputSelect for a char type filed as i don't want to change my datatype in database at this stage.
I try this in JDeveloper 9.03, 9.034, 9.04. The result is the same.If I were in your shoes, here's how I would do it:
<%-- Assuming you have dsRoom and dsResponsibility --%>
<%-- Select is an HTML tag --%>
<select name="ROOM" size="1">
<% char roomID =""; // Init your character var
// Open a rowsetIterator to get the records and add them to the LOV
<jbo:RowsetIterate datasource="dsResponsibility" changecurrentrow="true" >
<% roomID = (char)dsResponsibility.getRowSet().getCurrentRow().getAttribute("ROOM"); // Grab the char value
// add the value to the LOV
%>
<option value="<%=roomID%>"><%=roomID%></option>
</jbo:RowsetIterate>
</select>
If you are using this as part of an edit page you may want to utilize the "selected" option of the <option> tag. In one instance I am doing this on an edit page because the use may open an existing record. If I don't account for it, then it will change the DB to contain the first value from the list! You can do a simple check like:
//Set the current record's char
char curRecord = (char)rowEdit.getAttribute("ROOM");
// inside the iterate:
if (curRecord == roomID) {
<option value="<%=roomID%>" selected><%=roomID%></option>
} else {
<option value="<%=roomID%>" ><%=roomID%></option>
Hope that helps! -
"invalid column name" using resultset.getString()???
I had a sql query against oracle db:
select table1.field1, table1.field2, table2.field3
from table1, table2
where table1.field1=table2.field1;
i got a valid resultset and i can enum the resultset by rs.getString(colnum). However, when i try to use rs.getString(table1.field1), i get a sql exception: "invalid column name". has anybody seen this before?
TIAHi,
You can also modify your query and use the keyword "As" to give your fields another name :
select user.name as userName, admin.name as adminName
from user, admin
rs.getString("userName");
rs.getString("adminName"); -
Buyer Beware!! No data plan when using Droid X as a hotspot!!
I purchased the Droid X right when it came out and got the "unlimited" data and hotspot options. I just received my first bill and it has $250 worth of data charges on it. I called customer support and learned that hotspot data is not in the unlimited plan. In fact, they do not offer a data plan for using the phone as a wifi hotspot - it's pay as you go.
This was the whole reason I bought this phone - to get the hotspot. I even turned in a wifi card I had with Sprint. Even the customer support supervisor admitted it does not make any sense. What a disaster..... #failCaboWaboMan wrote:
Yes, I am beginning to understand this now, they would not want someone selling mobile hotspot space. Can someone give me some idea of what 2 gigs of data represents, I am having a bit of trouble wrapping my head around this. This is going to be a pure convenience thing for me. Example i'm on the road with my laptop and need to mod an excel, word or access doc on the fly and send it off...am I good to do this several times or do I wait till i'm home or in the hotel?
Very interesting conversation all, I appreciate the input
short but sweet....do not play wow thru your phone while driving
CaboWaboMan> nice name btw.
It's hard to fully judge how much data is used. just surfing and sending emails would ammount to thousands of pages and text only emails before you hit 2 gigs. But, once you start adding in attachments you will have to figure in the size of those attachements. If you send 10 x 200MB files in a month, you've hit your limit on the attachments alone.
I stream pandora 5 days a week for hours upon hours a day and I use about 2.5 gigs of data per month, plus web surfing. If i download a bunch of files on my phone that number will bounce up tremendously.
So...likely the excel files ammount to a matter of Kbs so it shouldnt be a problem to stay WELL within that 2gb limit. I personally don't think it is worth the extra 20 bucks a month for 2 extra gigs. I would transfer my excel sheet to my phone via USB and then send it direct from the droid to my recipient.
Dj -
Data Corrupted when using CREATE AS SELECT * FROM over DB LINK
Hi ,
I wonder if anyone has suffered a simillar issue as this:
I have a DB Link Between a 10gR1 (Base install not patched) database on Windows 2003, and a 10gR2 (with latest Patch Database ) on Sun Solaris. The 10.1 DB is the SOURCE 10.2 is TARGET
When using a statement like the following on the Target :
CREATE TABLE a AS SELECT * FROM TABLE a@SOURCE
The statement completes, however for some (not all) tables, the data content is seriously corrupted, I noticed this when trying to apply a UKey on the newly created table in TARGET. The data was completely messed up for around 600 out of 450000 rows, I could not easily tell which rows were messed up as it was the columns that build the UKey that were affected :-(
The same happens if I precreate the table and use INSERT /*+APPEND*/ INTO AS SELECT.... etc
I realise that using an unpatched 10.1 is not nessasarily advisable, however currently it is difficult for us to patch or upgrade the DB...
If anyone has seen this before an/or has any ideas what might be the cause , I would appreciate any help I can get.
Cheers
JAmesThe Problem Manifest itsself in that some fileds are created with incorrect Values, specificaly in easy to identify cases NULL where the original values where not NULL.
These field do not contain special chars like ä or ß , so it does not seem to indicate a charset issue.
JAmes -
Corrupt data error when using Windows backup on Oracle
Our SAP servers include a SDLT internal tape drive that we use for doing a complete system backup. When using Windows Backup we get the following message in the backup log:
WARNING: Portions of "\oracle\T00\sapdata1\protd_2\PROTD.DATA2" cannot be read. The backed up data is corrupt or incomplete.
This file will not restore correctly.
This is occuring on a couple of different systems but the wierd thing is when this happens in occurs on one Oracle drive in one system and the other Oracle drive on another system i.e. the G: drive on our TST sysytem and the E: drive on another. The E: and G: drives contain the main Oracle datafiles.
Has anybody ever encounter something like this and what can I do about it?
Thanks;
Gale S.Especially no backup tool would know about the
fact
that a Oracle block had been changed after it was
copied.
Now I have to contracdict
There are backup tools (e. g. OpenFile Manager from
Legato/EMC), that track the filesystem changes and
makes sure, the backups are consistent in sense of
filesystem blocks. We´re backing up some ORA
databases (non-SAP, 7.3.4 and 8.1.7) for ages now -
and I never saw this kind of corruptions.
Well, these Backup-Tools do perform copies I/O-Consistent. That's different than DB-Block-consistent in the first place. Anyhow due to the fact that the DBMS do have a syncronizing between I/Os and writing out the blocks this leads both to consistent blocks.
I just wonder, how the database would deal with such
"inconsistent" files. Given the fact, you start a
backup at filesystem block 0, the database is being
backed up and a transaction is committed and
something is written to block 100, 200 and 500. The
backup is on block 300. If you now restore the
database, it has the already commited block 500 in
the file but 100 and 200 are not yet written in the
database file. The redo will then find an already
commited transaction on 500. What magic will tell the
engine, that this is due to an online database
backup? I mean, if you set the tablespace to backup,
the engine "knows" the state - but if you just backup
the file, the engine is unaware of that... I´m just
curious how this is handled...
Well the trick here is: we tell the database before we plan to copy the data. When a ONLINE backup is done, the tablespaces are set into BACKUP mode. This changes two things for us:
1. The datafile headers of these tablespaces are not updated anymore although dirty blocks are still written out to these files. Since the control files that keep the SCN (system change number) are updated nevertheless, the database will know at recovery time that these files had been in online backup mode and do need recovery to become consistent again.
2. The UNDO-information is not only written out to the UNDO/ROLLBACK-Tablespace but additionally to the REDOLOGS. So, for the time where the tablespaces are in BACKUP mode, we have all information needed to make a block consistent again - regardless if a transaction had been commited or rolled back - in the redolog. So a full recovery of all changes is possible with
that.
That's basically the "magic" behind this.
If the copy of the datafile is done without this - well, then there's no magician in the world that would been able to get it consistent again. Online Backups with Oracle are only possible with BACKUP mode or RMAN (ok, and possible some 3rd party hacks...).
KR Lars -
Data clipping when using SGL file write
Hi all,
I am using buffered data acquisition with Binary save. I have done buffered data acqusition but when i try to record data in Binary format and view it later with my software axoscope or clampex. The data is clipped. I use the vi write to SGL file. I have also attached my VI. Please look at it and tell me if i have to make any changes.
Thanks,
Srikanth
Attachments:
cded.vi 73 KBIt is not clear to me why you multiply your data by 2^32 before saving! SGL has only about 6 decimal digits of resolution so your data is probably truncated.
Just remove the multiplication by 2^32 and you will save exactly the same data as you see on your indicators.
(It is also possible that your data looks "distorted" because your other software packages expects the binary data to be in little-endian format. Remember, LabVIEW is big endian on all platforms. There are many simple solutions to this issue, but let's first see if this is even the problem. What OS are you using?).Message Edited by altenbach on 02-26-2005 02:29 PM
LabVIEW Champion . Do more with less code and in less time . -
No data found when using form to add value
So I'm working on designing an application where I can move lets say, an order, throughout three steps. Each of these steps have a table containing the orders within that particular step. In the first table, I have created a link column that directs the primary key of the row in step 1, into a form for the table on step 2. I have created a separate form for this process because I found that if I used the same form that I created at the time of the report, I receive another error because that form has a fetch row process that is used for editing a row. In this new form, I have deleted the fetch process because it produces another error and I only need the primary key fetched which is done by the link column in the report. When I implement a fetch row process, I get the following error:
is_internal_error: false
ora_sqlcode: 100
ora_sqlerrm: ORA-01403: no data found
component.type: APEX_APPLICATION_PAGE_PROCESS
component.id: 627741908351057658
component.name: FRP_on_OCS
error_backtrace:
ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 618
ORA-06512: at "APEX_040100.WWV_FLOW_DML", line 317
ORA-06512: at "APEX_040100.WWV_FLOW_PROCESS", line 322
When I remove the automated fetch row process, I get a ORA-01403: no data found error
Any ideas?
Edited by: switbeck on May 28, 2013 1:54 PMI found out that it seems that by using the link column, it thinks that I am trying to edit data in the table, but I am not. I am trying to add a row to a new table that has a PK/FK relationship with the first table by using a link column. Any workaround for this?
Thanks,
Steve -
Extra bytes in data transfer when using VISA and C++ instead of LABVIEW
Hello,
I've a problem when I try to download the capture buffer from a spectrum analyzer with C++Builder and VISA.
If I do that with LABVIEW (with VISA read and write) everything is fine. Instead, with C I get extra bytes in
the stream. In particular whenever there is a '0A' in the stream I get also a '0D' before it. I'm using a GPIB-USB-B card from National. I know I could easily get rid of those extra bytes in my code, but I'd like a cleaner solution.
Does anybody know the difference between the following code and LABVIEW VISA read and write routines?
Is there some attributes I have to set in C which is automatically set in LABVIEW?
Thanks a lot in advance!!
Simone
ViSession defaultRM, vi;
viOpenDefaultRM (&defaultRM);
viOpen (defaultRM, "GPIB0::10::INSTR", VI_NULL,VI_NULL, &vi);
ViStatus err = viSetAttribute(vi, VI_ATTR_IO_PROT, VI_NORMAL);
ViUInt32 retCount;
err = viWrite(vi, "CGET?0,0\n", strlen("CGET?0,0\n"), &retCount);
ViByte* buffer = new ViByte[100000];
err = viRead(vi, (ViByte*)buffer, 100000, &retCount);
FILE *fp;
fp = fopen("data", "w");
fwrite (buffer, retCount, sizeof(ViByte), fp);
fclose(fp);
viClose(defaultRM);
viClose(vi);
delete []buffer;Simone,
this has to do with LabVIEW running on multiple platforms with different End-of-line signals.
With Windows this is usually 0x0d0a, which is the ASCII control code for . Other platforms use typically just one of those characters; I believe with MacOS there used to be just a 0x0a and with Unix this might have been 0x0d.
In order to avoid hazzles, the LabVIEW develloper decided to convert the platform-specific End-of-line signals into a LabVIEW-internal character (which is 0x0a) when reading strings and back when sending strings out of LabVIEW.
So, your device sends out 0xd0a and LabVIEW removes the 0x0d. Everything is OK.
Greetings from Germany!
Uwe -
Problem on loading DAT file when using 3G network modem
Hello,
I'm having some strange problem when I'm trying to load my game on the part where DAT file with Map Object is read, using 3G Network Modem. This issue started when I migrated my applet from one host to another. Everything loads well, until the user authentication. On user authenticatiom I'm recieving map name which I should load and show the user on it. I'm recieving the message where map name is mentioned, but after, when the process of loading map begins(when I need to read DAT file which is only 15KB) application blocks(browser and JVM also block).
I thought it could be because of slow network communication, but it's not the reason, since I have tested(using Bandwidth limiter software) with 5 KBs/Second and it loads well and application is running well.
Any clue why this can happen? If code is needed I'll post some pieces related to the process of map creation.
URL or application: [ http://mimosa.dei.uc.pt/serhiy/demo/hoonline.html|http://mimosa.dei.uc.pt/serhiy/demo/hoonline.html]
Accounts: test01/test01 ... test0n/test0n ... test05/test05 (n is number from 1 to 5)
Thanks in advance!You have to upload it with FileReference.upload() to a PHP
(or other server-side) script which saves it to a folder on the
server. When the DataEvent.UPLOAD_COMPLETE_DATA event has been
dispatched you can then use the FileReference.name to load from the
file on the server just like any other image.
Maybe you are looking for
-
HP Officejet Pro 8500 wireless printing
I am using a lap top with windows 7. I have microsoft office version 2003. I have a document in my excel program that is in landscape position. I need to rotate it 90 degrees clockwise in order to print it in a portrait position. All my other pages f
-
ABAP routine in the infopackage for Multiple Selection
Hi experts, I want to include a abap routine in the infopackage for Multiple Selection so that I can fetch only the required Material Numbers when the InfoPackage is schedule. As I have the constraints that I have to select certain Material Numbers o
-
Dear readers and admins My question is about the "correct" setting of the user and group rights, so the following is possible. It relates to Server 10.3 and to 10.4. Requirements: Group 1 = "Regular user" Group 2 = "Administration, Accounting" User 1
-
Getting a JFrame to display from a JSP, remaining JSP code waits for frame
Hello, I'm new to Java and just started using JSPs. My objective is to call a display window (from a JSP) that shows the user a list of project selections. Once the user has made their selections and clicked a Submit button, the display class capture
-
Timemachine and mountain lion cannot find harddrive to boot to
So i booted my macbook pro this morning and it came up with the question mark sign. so i restart in recovery mode with command r. tried to repair the drive and it only came up with verify so then i tried to backup from time machine and it found the e