Problems with SQL*Loader and java Runtime
Hi. I'm trying to start SQL*Loader on Oracle 8 by using Runtime class in this way:
try{
Process p = Runtime.getRuntime().exec( "c:\oracle\ora81\bin\sqlldr.exe parfile=c:\parfile\carica.par" );
/*If i insert this line my application never stops*/
p.waitFor();
}catch( Exception e ){
. I have seen that if lines to insert are less then 400 all works very fine, but if lines number is greater than 400, all data go in my tables but my log file is opened always in writing.Can anyone tell me why?
Thanks
Just a note if the executable "sqlldr.exe" does not stop (quit running) by itself the p.waitFor() will wait for ever.
Similar Messages
-
Import and process larger data with SQL*Loader and Java resource
Hello,
I have a project to import data from a text file in a schedule. A lager data, with nearly 20,000 record/1 hours.
After that, we have to analysis the data, and export the results into a another database.
I research about SQL*Loader and Java resource to do these task. But I have no experiment about that.
I'm afraid of the huge data, Oracle could be slowdown or the session in Java Resource application could be timeout.
Please tell me some advice about the solution.
Thank you very much.With '?' mark i mean " How i can link this COL1 with column in csv file ? "
Attilio -
Problem with SQL*Loader and different date formats in the same file
DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
System: AIX 5.3.0.0
Hello,
I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
...;2010-12-31;22/11/1932;...
I load this data using the following lines in the control file:
EXECUTIONDATE1 TIMESTAMP NULLIF EXECUTIONDATE1=BLANKS "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
DELDOB TIMESTAMP NULLIF DELDOB=BLANKS "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
The relevant NLS parameters:
NLS_LANGUAGE=FRENCH
NLS_DATE_FORMAT=DD/MM/RR
NLS_DATE_LANGUAGE=FRENCH
If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
How can I get both date values to load correctly?
Thanks!
SylvainThis is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(
-
Problem with SQL connection and a Collection
hi all,
I have two problems with sql...
1. how can I assign the values of a resultset to a collection?
2. how can I close the sql connection, because when I close the statement and connection error shows me in the resultset
thanks!Hello Pablo,
RetrivingResults In Collection:
1) use getObject method, and assign it to collection.
Collection c_obj=new ArrayList();
while(rs.next())
c_obj.add(rs.getInt(Project_ID), rs.getString(Project_Name));
Closing ResultSet
2) The close() methos of ResultSet closes the ResultSet object, like bellow
ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
rs.close(); //Closes the result set -
Problem import csv file with SQL*loader and control file
I have a *csv file looking like this:
E0100070;EKKJ 1X10/10 1 KV;1;2003-06-16;01C;75
E0100075;EKKJ 1X10/10 1 KV;500;2003-06-16;01C;67
E0100440;EKKJ 2X2,5/2,5 1 KV;1;2003-06-16;01C;37,2
E0100445;EKKJ 2X2,5/2,5 1 KV;500;2003-06-16;01C;33,2
E0100450;EKKJ 2X4/4 1 KV;1;2003-06-16;01C;53
E0100455;EKKJ 2X4/4 1 KV;500;2003-06-16;01C;47,1
I want to import this csv file to this table:
create table artikel (artnr varchar2(10), namn varchar2(25), fp_storlek number, datum date, mtrlid varchar2(5), pris number);
My controlfile looks like this:
LOAD DATA
INFILE 'e:\test.csv'
INSERT
INTO TABLE ARTIKEL
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(ARTNR, NAMN, FP_STORLEK char "to_number(:fp_storlek,'99999')", DATUM date 'yyyy-mm-dd', MTRLID, pris char "to_number(:pris,'999999D99')")
I cant get sql*loader to import the last column(pris) as I want. It ignore my decimal point which in this case is "," and not "." maybe this is the problem. If the decimal point is the problem how can I get oracle to recognize "," as a decimal point??
the result from the import now, is that a decimal number (37,2) becomes 372 in the tableSet NLS_NUMERIC_CHARACTERS environment variable at OS level, before running SqlLoader :
$ cat test.csv
E0100070;EKKJ 1X10/10 1 KV;1;2003-06-16;01C;75
E0100075;EKKJ 1X10/10 1 KV;500;2003-06-16;01C;67
E0100440;EKKJ 2X2,5/2,5 1 KV;1;2003-06-16;01C;37,2
E0100445;EKKJ 2X2,5/2,5 1 KV;500;2003-06-16;01C;33,2
E0100450;EKKJ 2X4/4 1 KV;1;2003-06-16;01C;53
E0100455;EKKJ 2X4/4 1 KV;500;2003-06-16;01C;47,1
$ cat artikel.ctl
LOAD DATA
INFILE 'test.csv'
replace
INTO TABLE ARTIKEL
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(ARTNR, NAMN, FP_STORLEK char "to_number(:fp_storlek,'99999')", DATUM date 'yyyy-mm-dd', MTRLID, pris char "to_number(:pris,'999999D99')")
$ sqlldr scott/tiger control=artikel
SQL*Loader: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:01 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Commit point reached - logical record count 6
$ sqlplus scott/tiger
SQL*Plus: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:11 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from artikel;
ARTNR NAMN FP_STORLEK DATUM MTRLI PRIS
E0100070 EKKJ 1X10/10 1 KV 1 16/06/2003 01C 75
E0100075 EKKJ 1X10/10 1 KV 500 16/06/2003 01C 67
E0100440 EKKJ 2X2,5/2,5 1 KV 1 16/06/2003 01C 372
E0100445 EKKJ 2X2,5/2,5 1 KV 500 16/06/2003 01C 332
E0100450 EKKJ 2X4/4 1 KV 1 16/06/2003 01C 53
E0100455 EKKJ 2X4/4 1 KV 500 16/06/2003 01C 471
6 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
$ export NLS_NUMERIC_CHARACTERS=',.'
$ sqlldr scott/tiger control=artikel
SQL*Loader: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:41 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Commit point reached - logical record count 6
$ sqlplus scott/tiger
SQL*Plus: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:45 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from artikel;
ARTNR NAMN FP_STORLEK DATUM MTRLI PRIS
E0100070 EKKJ 1X10/10 1 KV 1 16/06/2003 01C 75
E0100075 EKKJ 1X10/10 1 KV 500 16/06/2003 01C 67
E0100440 EKKJ 2X2,5/2,5 1 KV 1 16/06/2003 01C 37,2
E0100445 EKKJ 2X2,5/2,5 1 KV 500 16/06/2003 01C 33,2
E0100450 EKKJ 2X4/4 1 KV 1 16/06/2003 01C 53
E0100455 EKKJ 2X4/4 1 KV 500 16/06/2003 01C 47,1
6 rows selected.
SQL> Control file is exactly as yours, I just put replace instead of insert. -
Loading huge file with Sql-Loader from Java
Hi,
I have a csv file with aprox. 3 and a half million records.
I load this data with sqlldr from within java like this:
String command = "sqlldr userid=" + user + "/" + pass
+ "@" + service + " control='" + ctlFile + "'";
System.out.println(command);
if (System.getProperty("os.name").contains("Windows")) {
p = Runtime.getRuntime().exec("cmd /C " + command);
} else {
p = Runtime.getRuntime().exec("sh -c " + command);
}it does what I want to, load the data to a certain table, BUT it takes too much time, Is there a faster way to load data to an oracle db from within java?
Thanks, any advice is very welcomeHave your DBA work on this issue - they can monitor and check performance of SQL*Loader
SQL*Loader performance tips [Document 28631.1]
SQL*LOADER SLOW PERFORMANCE [Document 1026145.6]
Master Note for SQL*Loader [Document 1264730.1]
HTH
Srini -
Problem with SQL*Loader loading long description with carriage return
I'm trying to load new items into mtl_system_items_interface via a concurrent
program running the SQL*Loader. The load is erroring due to not finding a
delimeter - I'm guessing it's having problems with the long_description.
Here's my ctl file:
LOAD
INFILE 'create_prober_items.csv'
INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
SEGMENT1 "TRIM(:SEGMENT1)",
SEGMENT2 "TRIM(:SEGMENT2)",
DESCRIPTION "TRIM(:DESCRIPTION)",
LONG_DESCRIPTION "TRIM(:LONG_DESCRIPTION)")
Here's a sample record from the csv file:
1,1,CREATE,0,546,03,B00-100289,PROBEHEAD PH100 COMPLETE/ VACUUM/COAX ,"- Linear
X axis, Y,Z pivots
- Movement range: X: 8mm, Y: 6mm, Z: 25mm
- Probe tip pressure adjustable contact
- Vacuum adapter
- With shielded arm
- Incl. separate miniature female HF plug
The long_description has to appear as:
- something
- something
It can't appear as:
-something-something
Here's the errors:
Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
LONG_DESCRIPTION.
Logical record ended - second enclosure character not present
Record 2: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
ORGANIZATION_ID.
Column not found before end of logical record (use TRAILING NULLCOLS)
I've asked for help on the Metalink forum and was advised to add trailing nullcols to the ctl so the ctl line now looks like:
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
I don't think this was right because now I'm getting:
Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column LONG_DESCRIPTION.
Logical record ended - second enclosure character not present
Thanks for any help that may be offered.
-TracyLOAD
INFILE 'create_prober_items.csv'
CONTINUEIF LAST <> '"'
INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
SEGMENT1 "TRIM(:SEGMENT1)",
SEGMENT2 "TRIM(:SEGMENT2)",
DESCRIPTION "TRIM(:DESCRIPTION)",
LONG_DESCRIPTION "REPLACE (TRIM(:LONG_DESCRIPTION), '-', CHR(10) || '-')") -
Error with Sql Server and Java App
Hi i have a java based multithread application which comunicate with SQL SERVER via DSN bridge , some time my application crashes with this error any idea what its happend and how to remove it .
Thanks
************* Exception ********************************8
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77F87EEB
Function=RtlEnterCriticalSection+0xB
Library=F:\WINNT\system32\ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.numResultCols(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLNumResultCols(JdbcOdbc.java:4625)
at sun.jdbc.odbc.JdbcOdbcStatement.getColumnCount(JdbcOdbcStatement.java:1235)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:352)
- locked <04DC3EE0> (a sun.jdbc.odbc.JdbcOdbcStatement)
at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288)
at advcomm.advrad.DBParams.Ltht(Unknown Source)
at advcomm.advrad.DBParams.BDhb(Unknown Source)
at advcomm.advrad.DlkhlHz.run(Unknown Source)
Dynamic libraries:
0x00400000 - 0x00406000 F:\j2sdk1.4.1_03\bin\java.exe
0x77F80000 - 0x77FFC000 F:\WINNT\system32\ntdll.dll
0x7C2D0000 - 0x7C335000 F:\WINNT\system32\ADVAPI32.dll
0x7C570000 - 0x7C623000 F:\WINNT\system32\KERNEL32.dll
0x77D30000 - 0x77DA8000 F:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78045000 F:\WINNT\system32\MSVCRT.dll
0x75030000 - 0x75044000 F:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000 F:\WINNT\system32\WS2HELP.DLL
0x6D340000 - 0x6D46B000 F:\j2sdk1.4.1_03\jre\bin\client\jvm.dll
0x77E10000 - 0x77E79000 F:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 F:\WINNT\system32\GDI32.dll
0x77570000 - 0x775A0000 F:\WINNT\system32\WINMM.dll
0x6D1E0000 - 0x6D1E7000 F:\j2sdk1.4.1_03\jre\bin\hpi.dll
0x6D310000 - 0x6D31E000 F:\j2sdk1.4.1_03\jre\bin\verify.dll
0x6D220000 - 0x6D239000 F:\j2sdk1.4.1_03\jre\bin\java.dll
0x6D330000 - 0x6D33D000 F:\j2sdk1.4.1_03\jre\bin\zip.dll
0x6D260000 - 0x6D26B000 F:\j2sdk1.4.1_03\jre\bin\JdbcOdbc.dll
0x1F7A0000 - 0x1F7DA000 F:\WINNT\system32\ODBC32.dll
0x71710000 - 0x71794000 F:\WINNT\system32\COMCTL32.dll
0x7CF30000 - 0x7D175000 F:\WINNT\system32\SHELL32.dll
0x70A70000 - 0x70AD6000 F:\WINNT\system32\SHLWAPI.dll
0x76B30000 - 0x76B6E000 F:\WINNT\system32\comdlg32.dll
0x1F840000 - 0x1F857000 F:\WINNT\system32\odbcint.dll
0x1F9C0000 - 0x1FA27000 F:\WINNT\System32\SQLSRV32.dll
0x41090000 - 0x410BD000 F:\WINNT\System32\SQLUNIRL.dll
0x77800000 - 0x7781E000 F:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76631000 F:\WINNT\system32\MPR.DLL
0x77820000 - 0x77827000 F:\WINNT\system32\VERSION.dll
0x759B0000 - 0x759B6000 F:\WINNT\system32\LZ32.DLL
0x779B0000 - 0x77A4B000 F:\WINNT\system32\OLEAUT32.dll
0x7CE20000 - 0x7CF0F000 F:\WINNT\system32\ole32.dll
0x7CDC0000 - 0x7CE13000 F:\WINNT\System32\NETAPI32.dll
0x77980000 - 0x779A4000 F:\WINNT\System32\DNSAPI.dll
0x75050000 - 0x75058000 F:\WINNT\System32\WSOCK32.dll
0x751C0000 - 0x751C6000 F:\WINNT\System32\NETRAP.dll
0x77BF0000 - 0x77C01000 F:\WINNT\System32\NTDSAPI.dll
0x77950000 - 0x7797B000 F:\WINNT\system32\WLDAP32.DLL
0x7C340000 - 0x7C34F000 F:\WINNT\System32\SECUR32.DLL
0x75150000 - 0x75160000 F:\WINNT\System32\SAMLIB.dll
0x769A0000 - 0x769A7000 F:\WINNT\system32\NDDEAPI.DLL
0x1FA30000 - 0x1FA46000 F:\WINNT\System32\sqlsrv32.rll
0x1F7F0000 - 0x1F80A000 F:\WINNT\system32\odbccp32.dll
0x74CB0000 - 0x74CCA000 F:\WINNT\system32\DBNETLIB.DLL
0x75500000 - 0x75504000 F:\WINNT\system32\security.dll
0x782D0000 - 0x782F2000 F:\WINNT\system32\msv1_0.dll
0x7C740000 - 0x7C7CC000 F:\WINNT\system32\CRYPT32.dll
0x77430000 - 0x77441000 F:\WINNT\system32\MSASN1.dll
0x77340000 - 0x77353000 F:\WINNT\system32\iphlpapi.dll
0x77520000 - 0x77525000 F:\WINNT\system32\ICMP.DLL
0x77320000 - 0x77337000 F:\WINNT\system32\MPRAPI.DLL
0x773B0000 - 0x773DF000 F:\WINNT\system32\ACTIVEDS.DLL
0x77380000 - 0x773A3000 F:\WINNT\system32\ADSLDPC.DLL
0x77830000 - 0x7783E000 F:\WINNT\system32\RTUTILS.DLL
0x77880000 - 0x7790E000 F:\WINNT\system32\SETUPAPI.DLL
0x7C0F0000 - 0x7C154000 F:\WINNT\system32\USERENV.DLL
0x774E0000 - 0x77514000 F:\WINNT\system32\RASAPI32.DLL
0x774C0000 - 0x774D1000 F:\WINNT\system32\rasman.dll
0x77530000 - 0x77552000 F:\WINNT\system32\TAPI32.dll
0x77360000 - 0x77379000 F:\WINNT\system32\DHCPCSVC.DLL
0x74CD0000 - 0x74CD8000 F:\WINNT\system32\DBmsLPCn.dll
0x0B990000 - 0x0B9E6000 F:\WINNT\system32\MSVCR71.dll
0x6D2E0000 - 0x6D2EE000 F:\j2sdk1.4.1_03\jre\bin\net.dll
0x782C0000 - 0x782CC000 F:\WINNT\System32\rnr20.dll
0x777E0000 - 0x777E8000 F:\WINNT\System32\winrnr.dll
0x777F0000 - 0x777F5000 F:\WINNT\system32\rasadhlp.dll
0x74FD0000 - 0x74FEE000 F:\WINNT\system32\msafd.dll
0x75010000 - 0x75017000 F:\WINNT\System32\wshtcpip.dll
0x77920000 - 0x77943000 F:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 F:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 F:\WINNT\system32\PSAPI.DLL
Local Time = Wed Mar 08 17:24:41 2006
Elapsed Time = 9294
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode)
#I'm having the same problem.
One potential solutions is to use a custom SQL server JDBC driver instead of going through the ODBC bridge. This will minimize dependencies and should also improved performance. Hope this helps.
- Joe -
Problem with SQL loader - "maximum length"
using SQL*Loader: Release 8.1.7.0.0
===================================
(full CTL enclosed below)
I have a problem with several rows, in which I'm getting the "Field in data file exceeds maximum length" error.
the DB field (referer) is a VARCHAR2(4000), and the field in the error rows never exceeds few hundred characters. According to Oracle docs I should be able to load fields which are no bigger than the DB field, what gives?
I tried the variation
referer CHAR "SUBSTR(:referer,1,100)"
for this field, which causes all the "referer" columns in the "good" rows to load no more than 100 characters, but the same error repeats for the same rows!
the input file is an IIS log, and the field is the REFERER field. its pure ASCII encoded, is there some character that cause Oracle to behave this way? is this a bug?
here is one "bad" row: the "bad" field starts with "ht
tp://web , is enclosed with quotes. I have replaced the client IP and other fields with xxx for privacy reasons.
after that, I have enclosed my CTL as well.
any help ?
Yoram Ayalon
BTW - I verified in the LOG file that the loader is reading my options for the columns as I described in the CTL. no problem there.
"2003-06-30 11:11:12" xxx.xxx.xxx.xxx WEBSRVXX 80 GET /xxx.xxx 200 0 778 1359 "ht
tp://web.ask.com/redir?bpg=http%3a%2f%2fweb.ask.com%2fweb%3fq%3dWhat%2bis%2bsign
al%2bcommunication%253f%26o%3d0%26page%3d1&q=What+is+signal+communication%3f&u=h
ttp%3a%2f%2ftm.wc.ask.com%2fr%3ft%3dan%26s%3da%26uid%3d032EBF1A318A100F3%26sid%3
d3d2bbe4f8d2bbe4f8%26qid%3d4B2346DA8A56C6418CB4DCB9091EEBA7%26io%3d0%26sv%3dza5c
b0db2%"
LOAD DATA
INFILE '/tmp/mod_websrvxx.txt'
APPEND INTO TABLE tmpLogs
FIELDS TERMINATED BY WHITESPACE optionally enclosed by '"'
(LogDate DATE "YYYY-MM-DD HH24:MI:SS", ClientIP, ServerName, ServerPort, ClientM
ethod,UriStem,Status,BytesSent,BytesReceived,TimeTaken,Referer CHAR "SUBSTR(:Re
ferer, 1, 100)" )Use:
readsize=3000000
or some large number to raise this limit.
Check the below link for detailed explanation
http://asktom.oracle.com/pls/ask/f?p=4950:8:380010202423963671::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2167288643374, -
Problem with XML loading and xmlns
I'm having a problem with loading an XML file that was created by Filemaker. Filemaker will output an XML file using one of two different grammars. One outputs in a mostly standard form that I can use with one glitch. Flash CS4 AS3 seems to have a problem with the xmlns in one of the nodes.
Specifically:
<FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
If I remove the xmlns="http://www.filemaker.com/fmpdsoresult" the file loads properly and I can access the various fields with no problem. However, when I leave the xmlns=... in, it will trace out the XML properly but I can't access the fields using the code listed below. This is driving me crazy!
With the xmlns part in the XML file I get the following error when it tries to load the thumbnail files:
TypeError: Error #1010: A term is undefined and has no properties.
I need to have it so that the user can enter/edit data and simply output the XML file from Filemaker and then Flash will load up the unaltered XML file and show the info requested by the user. That is to say I could have the user open the XML file in a word processing application and have them delete the xmlns..., but that is rather cumbersome and not very user friendly.
I've tried every xml.ignore function I could find but it doesn't help. Hopefully someone out there can help
Thanks,
-Mark-
Partial XML:
XML From Filemaker Export:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This grammar has been deprecated - use FMPXMLRESULT instead -->
<FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
<ERRORCODE>0</ERRORCODE>
<DATABASE>Sport.fp7</DATABASE>
<LAYOUT></LAYOUT>
<ROW MODID="1" RECORDID="1">
<FirstName>Mark</FirstName>
<LastName>Fowle</LastName>
<Sport>Sailing</Sport>
<Medal>None</Medal>
<CourseOfStudy>Design</CourseOfStudy>
<Year>1976-1978</Year>
<HomeState>California</HomeState>
<ImageName>93</ImageName>
</ROW>
</FMPDSORESULT>
AS3 Code:
import fl.containers.UILoader;
var aPhoto:Array=new Array(ldPhoto_0,ldPhoto_1,ldPhoto_2,ldPhoto_3,ldPhoto_4,ldPhoto_5);
var toSet:int=10;//time out set time
var toTime:int=toSet;
var photoPerPage:int=6;
var fromPos:int=photoPerPage;
var imgNum:Number;
//var subjectURL:URLRequest=new URLRequest("testData_FM8.xml");
var subjectURL:URLRequest=new URLRequest("Sports.xml");
var xmlLoader:URLLoader=new URLLoader(subjectURL);
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
var subjectXML:XML = new XML();
subjectXML.ignoreWhitespace=true;
subjectXML.ignoreComments=true;
subjectXML.ignoreProcessingInstructions=true;
function xmlLoaded(evt:Event):void {
subjectXML=XML(xmlLoader.data);
if (root.loaderInfo.bytesTotal==root.loaderInfo.bytesLoaded) {
removeEventListener(Event.ENTER_FRAME, xmlLoaded);
trace("XML Data File Loaded");
trace(subjectXML);
} else {
trace("File not Found");
imgNum=2;//subjectXML.ROW.length;
trace(subjectXML);
loadThumb(0);
function loadThumb(startPos:int):void {
var count:Number=aPhoto.length;
trace(subjectXML.DATABASE);
for (var i=0; i<count; i++) {
try{
aPhoto[i].source="images/"+subjectXML.ROW[startPos+i].ImageName+"_main.jpg";
}catch (e:Error){
trace(e);
aPhoto[i].mouseChildren=false;
aPhoto[i].addEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
trace("Current mem: " + System.totalMemory);
ldAttract.visible=false;
function unloadThumb():void {
var count:Number=aPhoto.length;
for (var i=0; i<count; i++) {
aPhoto[i].unload();
aPhoto[i].removeEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
trace("Current mem: " + System.totalMemory);
function onThumbClick(evt:MouseEvent) {
var i:Number;
//trace("Thumbnail Clicked " + evt.target.name);
i=findPos(evt.target.name);
ldLrgPhoto.source="images/"+subjectXML.ROW[i+fromPos].LOCAL_OBJECT_ID+"_main.jpg";
ldLrgPhoto.visible=true;
btnPrev.visible=false;
btnNext.visible=false;
gotoAndStop("showPhoto");
function findPos(thumb:String):Number {
var pos:Number;
var count:Number=aPhoto.length;
for (var i:Number=0; i<count; i++) {
if (thumb==aPhoto[i].name) {
pos=i;
return pos;Hi,
I was trying to use xml namespaces, so in my application I receive an XML file from the server. The file has a namespace, so when I parse the file I need to specify the namespace:
I got the following piece of xml:
<ls:exchange xmlns:ls=".../tsw" xmlns:tm="http://kxa">
<ls:projects>
<tm:annotation id="" date="" action="getprojects" status="responseok"/>
<ls:project id="" name="proj" description="..." owner="asss" release="2" />
<ls:projectV id="" version="" creationdate="" modificationdate=""/ >
</ls:project>
</ls:projects>
</ls:exchange>
and the following code
<mx:VBox label="WELCOME" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Tree id="tree" dataProvider="{srv.lastResult.project}" labelField="@name" width="300" height="100%" itemOpen="itemOpenEvt(event);" />
</mx:VBox>
So i want to display the content of the xml (project nodes”) in a tree view, but i don’t know how to includes the namespace"ls:" in the data provider “srv.lastResult.project”. can u help me it’s urgent.
sincerly
Celine -
Hi,
I am using a Java Stored Procedure to invoke a SQL Loader process. The RDBMS Version is 8.1.7 on HP-UX 11. I invoke the procedure by calling: exec runcommand('sqlldr user=scott/tiger@orcl control=/home/mydir/ctlfile.ctl log=/home/mydir/logfile.log direct=true errors=550')
where runcommand is the name of the java stored procedure.
The SQL Loader process returns a value of 3 which is the return value for an Operating System Error. I am unable to find any errors related to the Operating System. Is there any particular environment variable which needs to be set before running the process.
I was able to run the same Java Stored Procedure on Personal Oracle on Windows XP without any problems.
TIA,
RameshHi,
Make sure that the path for data file in control file is correct.
Then it serves your purpose.
Otherwise, give full path to "sqlldr", then run it.
Please let me know the result.
Thanks
Srinivasa Rao -
Help with sql statements and Java
Hi,
How can I create a string kind of like this
Select * From Students Where Name Like "Bob Burns";
As the sql statement might indicate I am using MS Access. I seem to be having problems with the double quotes required by the Like operator in MS Access, Java views that as a beginning of a string as oppposed to an actual string value.Like this:
Connection connection = null;
PreparedStatement stmt = null;
ResultSet res = null;
try {
connection = ...get from connection pool...;
String sql = "select ... from ... where name like ?";
stmt = connection.prepareStatement(sql);
stmt.setObject(1, "%Bob%", java.sql.Types.VARCHAR);
res = stmt.executeQuery();
while (res.next()) { ...the usual...; }
} finally {
...close res, stmt & return connection to pool...
}You can try stmt.setString() instead of setObject() but rumor has it that some mssql drivers have a bug that makes setString() not work with "like", but oddly enough setObject() works. -
Problems with sql developer and win 8 64 bit
Hi there,
It's my first time in this forum, I am a student programmer and I have many problems to install SQL Developer on Oracle Database 12c. I actually managed to install both, but I could not make them work. My question is SQL Developer works on the Windows 8 platform 64-bit?
I'm going crazy, help me please .... Thanks for a while!!!SqlDeveloper should have no problem working in Win 8, but i do not think it's a supported platform yet.
The Database could be a little more troublesome, if you only need a working database environment to make experiments you could find the "pre-built" Virtual Machines useful.
For Win 8 and 12c try using the EA release of SQLDeveloper 4, because if I'm not mistaken the current 3.2.2 could have some problems with 12c. -
Issue with SQL Loader and tha last field
Hi
I have a data file to load . The Load is running fine. But the last record comes with a a junk character. when loaded into the table.
when we open the file it shows nothing.
I tried replacing ^M and chr(10) but of no use.
can you please asssit men in this.. We have a go live soonYou need to provide us more details...
SQL and PL/SQL FAQ
By the way:
Have you considered using external tables?
They have more benefits than SQL*Loader...
http://www.oracle-developer.net/display.php?id=204
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:6611962171229
http://www.oracle-base.com/articles/9i/ExternalTables9i.php -
Problem using SQL-LOADER and Unique Identifiers
I'm trying to load a fixed-length records file containing people names and phone numbers. Data is specified as follows
Toni Tomas66666666669999999999
Jose Luis 33333333330000000000
Notice that a maximum of 2 numbers can follow a person name, and 0000000000 means "no number specified".
I want to assign a unique identifier to people (instead of using the NAME field as a Primary Key) using an Oracle Sequence. I did that, but I don't know
how to assign the same id to each number.
Considering the 2 previous lines, desired result should be:
PEOPLE
======
1 Toni Tomas
2 Jose Luis
TEL_NUMBERS
===========
1 6666666666
1 9999999999
2 3333333333
In order to achieve that, my Control File looks like this
LOAD DATA
INFILE phonenumbers.txt
INTO TABLE people
personID "mySequenceName.nextval", --an Oracle sequence
name POSITION(1:10) CHAR
INTO TABLE tel_numbers
WHEN phonenumber !='0000000000'
personID !!!DON'T KNOW HOW TO REFERENCE THE SAME ID!!!!
phonenumber POSITION(11:20) CHAR
INTO TABLE tel_numbers
WHEN phonenumber !='0000000000'
personID !!!DON'T KNOW HOW TO REFERENCE THE SAME ID!!!!
phonenumber POSITION(21:30) CHAR
I tried lots of things, but anyone works:
a) reference the ID using something like ":\"people.personID\" (or similar aproaches)
b) using a BEFORE INSERT TRIGGER getting the CURRVAL value of the Sequence. This solution
does not work because it seems that all people is loaded before any telephone number. Hence,
all phone numbers are associated, wrongly, to the last person in the data file.
Does anyone know how can I solve this issue?
Help would be appreciated. Thank you.Hi V Garcia.
Information within the file is correct. Each line represents a COMPLETE record (Part of the line represents parent information and the rest is children data). As you can see in my first message, you can have more than one detail for a given master (i.e. two phone numbers):
Toni Tomas66666666669999999999
(10 chars for the name, 10 for each phone number. Thus, 2 children records to be created)
With the solution given by Sreekanth Reddy Bandi (use of CURRVALUE within the SQL-Loader Control File), not all the details are linked to the parent record on the DB tables. It seems SLQ-Loader gets crazy when there is such amount of information.
Maybe you are looking for
-
Cannot send email on iMac OS 10.8.5, but can receive email fine
Hi there, I cannot send email (SMTP) from my iMac OS 10.8.5, email version 6.6 I have checked all the settings and they are exactly the same as my MacBook Pro OS 10.8.5, email version 6.6 Email works absolutely fine on MacBook Pro (POP and SMTP) but
-
HELP!!! remote desktop and time capsule
Hello! Could You help me? I have two problems with access to my Time Capsule. I have wireless network at home based on Time Capsule, with one static IP. I have conected it (wireless) with two iMac's. Me and my girlfriend we have also two macbooks and
-
Applet does not get client certificate from browser (Firefox, IE7)
I'm writing a web service which runs Tomcat through Apache. One critical requirement is that the service be able to invoke certain device drivers on the end user's machine. Fortunately, there is a Java API for this, so this requirement can be fulfill
-
BW iView to BSP iView (PCUI ) navigation
Would it be possible to launch BSP iView (PCUI application ) from BW iView? Would it be possible to configure Object Links for this scenario? I would like to launch BW iView inside Portal for ex: My Teams Opportunities , once the list of opportuniti
-
Hello All, Please give me steps to do physical and logical partioning in infocube