Trigger not changing a null value to -1 on insert, but works on update?
Here is the trigger I am working on.
If i update a row it will update the org_type_id to -1. However, nightly a job runs to append new data to the table. I can't change the fact that every day a few "deleted org"'s have a org_type_id as null.
So, this trigger was supposed to solve it, but it ONLY works if a row is updated, it doesn't work on inserted new rows.
Thoughts?
CREATE OR REPLACE TRIGGER MDMR.MDM_ORG_TYPE_ID
BEFORE INSERT OR UPDATE
ON MDMR.MDM_ORG
FOR EACH ROW
declare
begin
if (UPDATING) then
if ((:old.org_name = 'Deleted Org') and (nvl(:old.org_type_id,0) = 0)) then
:new.org_type_id := -1;
end if;
end if;
if (INSERTING) then
DBMS_OUTPUT.put_line ('INSERTING1');
if ((:new.org_name = 'Deleted Org') and (nvl(:new.org_type_id,0) = 0)) then
DBMS_OUTPUT.put_line ('INSERTING2');
:new.org_type_id := -1;
end if;
end if;
end;
/
Hi,
It looks fine to me (or, rather, it would look fine if it were formatted), but I can't test it without your table.
Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data. In the case of DML problems (like this), the results are the contents of the changed table after each DML operation.
Are you sure that 'Deleted Org' is spelled exactly the same in the trigger and in your INSERT statements? That includes capital letters and trailing spaces, including those automatically supplied for CHAR columns.
Does it work when you test it, but fail during the nightly job?
Similar Messages
-
Index (or not) for excluding NULL values in a query
Hello,
I have table that can become very large. The table has a varchar2 column (let's call it TEXT) that can contain NULL values. I want to process only the records that have a value (NOT NULL). Also, the table is continuously expanded with newly inserted records. The inserts should suffer as little performance loss as possible.
My question: should I use an index on the column and if so, what kind of index?
I have done a little test with a function based index (inspired by this Tom Kyte article: http://tkyte.blogspot.com/2006/01/something-about-nothing.html):
create index text_isnull_idx on my_table(text,0);
I notice that if I use the clause WHERE TEXT IS NULL, the index is used. But if I use a clause WHERE TEXT IS NOT NULL (which is the clause I want to use), a full table scan is performed. Is this bad? Can I somehow improve the speed of this selection?
Thanks in advance,
FransI build a test case with very simple table with 2 columns and it shows that FTS is better than index access even when above ratio is <= 0.01 (1%):
DROP TABLE T1;
CREATE TABLE T1
C1 VARCHAR2(100)
,C2 NUMBER
INSERT INTO T1 (SELECT TO_CHAR(OBJECT_ID), ROWNUM FROM USER_OBJECTS);
BEGIN
FOR I IN 1..100 LOOP
INSERT INTO T1 (SELECT NULL, ROWNUM FROM USER_OBJECTS);
END LOOP;
END;
CREATE INDEX T1_IDX ON T1(C1);
ANALYZE TABLE T1 COMPUTE STATISTICS
FOR TABLE
FOR ALL INDEXES
FOR ALL INDEXED COLUMNS
SET AUTOTRACE TRACEONLY
SELECT
C1, C2
FROM T1 WHERE C1 IS NOT NULL;
3864 rows selected.
real: 1344
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=59 Card=3864 Bytes=30912)
1 0 TABLE ACCESS (FULL) OF 'T1' (Cost=59 Card=3864 Bytes=30912)
Statistics
0 recursive calls
0 db block gets
2527 consistent gets
3864 rows processed
BUT
SELECT
--+ FIRST_ROWS
C1, C2
FROM T1 WHERE C1 IS NOT NULL;
3864 rows selected.
real: 1296
Execution Plan
0 SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=35 Card=3864 Bytes=30912)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'T1' (Cost=35 Card=3864 Bytes=30912)
2 1 INDEX (FULL SCAN) OF 'T1_IDX' (NON-UNIQUE) (Cost=11 Card=3864)
Statistics
0 recursive calls
0 db block gets
5052 consistent gets
3864 rows processed
and just for comparison:
SELECT * FROM T1 WHERE C1 IS NULL;
386501 rows selected.
real: 117878
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=59 Card=386501 Bytes=3092008)
1 0 TABLE ACCESS (FULL) OF 'T1' (Cost=59 Card=386501 Bytes=3092008)
Statistics
0 recursive calls
0 db block gets
193850 consistent gets
386501 rows processedHence you have to benchmark you queries with and w/o index[es] -
ViewRowImpl.writeXML: not to omit null values
Hi.
I want to use writeXML method in ViewRowImpl to get current row's data in XML format. Here is a snippet of my code
Node rootNode = myViewRowImpl.writeXML(1, XMLInterface.XML_OPT_ALL_ROWS);
StringWriter sw = new StringWriter();
try {
Transformer t = TransformerFactory.newInstance().newTransformer();
t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
t.setOutputProperty(OutputKeys.INDENT, "yes");
t.transform(new DOMSource(rootNode), new StreamResult(sw));
} catch (TransformerException te) {
System.out.println("Transformer Exception");
System.out.println(sw.toString());
...The problem is that there are missing tags of attributes which has null value (does not have a value). How to "force" writeXML method or even transformer to output empty tags for attributes that does not have values definied?
Thx
RegardsAs per the doc.
38.7.3.2 Controlling Element Suppression for Null-Valued Attributes
By default, if a view row attribute is null, then its corresponding element is omitted from the generated XML. Select the attribute on the Attributes page of the overview editor and in the Property Inspector, select the Custom Properties navigation tab and set the custom attribute-level property named Xml Explicit Null to any value (e.g. "true" or "yes") to cause an element to be included for the attribute if its value is null. For example, if an attribute named AssignedDate has this property set, then a row containing a null assigned date will contain a corresponding AssignedDate null="true"/ element. If you want this behavior for all attributes of a view object, you can define the Xml Explicit Null custom property at the view object level as a shortcut for defining it on each attribute. -
Will substr + not function ignore null values ?
hi guys
i have a table test with 1 column named (value) of varchar2 type.
inside this table, i have 3 rows.
1) 2255
2) null
3) 5522
when i do select * from test where substr(value,1,1) not in ('3'), it only returns me
row 1) 2255
row 3) 5522
but why doesnt it return me row 2 with null value as well ?
since substr(null) will generate null. and null is also NOT IN ('3'), why doesnt it shows?
any ideas guys ?Because NULL is unknown.
By definition you cannot say if unknown is IN or NOT IN anything.
So you have to account for the unknown however you think appropriate, in your case that would mean saying:
select * from test where substr(value,1,1) not in ('3') OR value IS NULL;
[pre] -
have created a custom component - MyImage - that has two children including a Bitmap as well as a Sprite.
My display object hierarchy is as follows -
mx:Canvas
view:MyImage
mx:Bitmap
my:Sprite
If I change the MyImage.scaleX, scaleY property, the children scale as I would expect them to.
However when I try to place the children in the center using placeAgain() on getting a resize event:
public function placeAgain():void
if (image==null) return;
var pCanvas:Canvas = this.parent as Canvas;
if (image.width <= pCanvas.width)
pCanvas.horizontalScrollPolicy="off";
image.x = (pCanvas.width -image.width)/2;
else
pCanvas.horizontalScrollPolicy="on";
image.x=0;
if (image.height <= pCanvas.height)
pCanvas.verticalScrollPolicy="off";
image.y = (pCanvas.height -image.height)/2;
else
pCanvas.verticalScrollPolicy="on";
image.y=0;
alignKids();
I find the image.height & width have not changed despite the image getting scaled!
Isn't the child supposed to have its bounds changed after scaling its
parent ? Especially after the child has actually been scaled correctly ?
Why are bounds of the child stuck at the same value as before scaling? I
am not caching the Bitmap, have not turned on caching of bitmaps.If I'm not mistaken, the bounds are updated with the scale. You rare not referencing the bounds, your referencing the width and height properties, which is a bit different. What happens if you use the getBounds function to get your dimensions?
-
Safari 417.9.2 not changing hidden input values from page to page
Hello,
I have a customer who uses Safari 417.9.2 (is this 2.0.3?) on Mac OS X (must be 10.4.x for this version?) on several Macs in her computer center.
My program has generated a multi-page web form where each of the HTML files has visible and hidden input fields. Each HTML file contains the same set of hidden input fields, a few of which having different values.
Using the Safari browser on one of the Macs in the computer center, upon submitting the first page, she is taken to the second page. No problems so far.
Upon submitting the second page, all of the visible input fields on the page are received by my program's script. In addition, all of the hidden input fields that were not also on the first page are received correctly. But, the hidden input fields having the same name as in the first page are received with the first page's values instead of the second.
My program's script has an optional feature that logs the information received from and sent to the browser. I have verified that the information sent to the Safari browser is correct. The logs show that despite receiving the second page with its visible and hidden input fields, upon submission, the Safari browser sends old values for those hidden input fields that have been seen before in the previous page.
To make it interesting, when she submits the page again, the Safari browser sends the correct information and does not exhibit this problem again.
FireFox 1.5.0.1 is installed on these machines as well. The FireFox browser does not exhibit this behavior on any of the machines she has tried.
The Safari browser exhibits this behavior on all of the machines she has tried.
I have looked at the defect database for Safari and found a defect that may be related:
http://bugzilla.opendarwin.org/show_bug.cgi?id=6733
It is unclear if the fix for defect 6733 fixes this problem or not. Even if it does, it seems the fix is available to her if she is willing to download one of the nightly builds.
Is there a workaround that I can suggest?
Any advice would be greatly appreciated.
Richard
Unknown Mac OS X (10.4)
Gateway E Series Windows XP Pro
Gateway E Series Windows XP Pro
Gateway E Series Windows XP Pro
Gateway E Series Windows XP ProTry deleting the cache associated with Safari ...
Quit Safari.
Go to ~/Library/Caches/com.apple.Safari/Cache.db.
Move the Cache.db file to the Trash.
Relaunch Safari to test.
I had to check this box upon installing a software in the past but I can't remember what it was.
Open System Preferences > Universal Access
Make sure the box next to: Enable access for aassitive devices is deselected. -
Airport extreme suddenly stopped "accepting" password. The signal appears strong -- just will not accept a log on. No changes have been made. It is not the modem. Have replaced the airport with my old linksys and wifi works fine. Is there a way to "reset" it and start over. We've unplugged it (airport) for 30 minutes and still the same result.
To do a factory reset, unplug the Extreme and push in the small round reset button on the back with a straightened paper clip or point of a pen and hold it in while plugging it back in - when the light starts to blink fast, release the button - then wait for the light to blink slowly - this indicates that the factory reset has completed - you can now re-configure the Extreme from scratch.
-
My iPhone 4S doesn't want to change orientation from portrait to landscape when turned - while in messaging.
It turns fine in other functions...??What are these other apps? Because for some applications, landscape view is not possible, like calender.
-
WebAn: select filter value on 0plant gives error (but works fine for other)
Hi all,
have something strange in the web analyzer:
i have a query with 0plant in the free characteristics
when I do 'select filter value' when it's in the free characteristics -> dump
when 0plant is in the rows and I do 'select filter value' -> dump
when I do 'select filter value' on 0customer that is in the free characteristics -> works fine
In the BEx Analyzer it works fine...
Anybody an idea?
Ciao
Joke
the strange world of BI...Hello,
Is it a 7.0 system? maybe the RSTT trace as per note 899572 can give you more information about this error.
Thanks,
Ricardo -
Not to display the null values from data base
Hiiii.
In a jsp file i have ten check boxes.The jsp file is mapped to a servlet file for parameter requesting and to
store it in DB.
The unchecked box values has null values.All the values are store in a Mysql DB table.
Again i have to display it in a jsp page from table.
The problem am facing was,how can i display only the values in a row.it must not display the null values and the crresponding column name.
Or any other way is their like below
How i can retrieve only the selected check boxes from tht jsp file.and store in backend.
Thanks in Advance
regards,
satheesh kannanHere is a rough example that may give you some ideas:
On the JSP page:
<%if(myData.getFirstName()!=null){%>
Your First Name'
<input type="text" name="firstName" value="<%=myData.getFirstName()%>">
<%}%>
In the servlet:
String firstName= request.getParameter("firstName");
if(firstName!=null){
//write it to the database
} -
2 Select lists do not change the value
Hi all,
I am having a situation. I have 2 select lists . The second one is dependent of the first one. Data are retrieved perfectly.
These select lists are done in page 0 and they are used in the referenced page. Apexlib is used in the page 0
When I change the item of the second list, the returned value used in a report, is ok. It takes the correct one.
If I change the item of the fist select list, the returned value of the second select list does not change(the displayed value are correct). the report is run (after changing the first select list) but the wrong returned value of the second list is taken.
The correct value of the second one is taken only if page is submited or we change the option.
it seems that it keeps the last value of the second list according to the previous selection.
Both select list is without submit.
How can I make a "refresh" of the returned values of the second select list (the records are ok) after changing the first one?
Thanks in advance
RafHi Rafael,
is ApexLib integrated correct? Did you check against http://apexlib.oracleapex.info/howto_integrate_manual_steps.html ?
Or did you try and install the ApexLib Feature Demonstration Application and see if it works there?
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at -
Hi,
we have an issue in our replicated environment using Streams.
We have a replicated table using the following index:
UK_S01_TEXT_FORMAT_TBL01 SOGID
UK_S01_TEXT_FORMAT_TBL01 INDEX_TEXT_FORMAT_ID
UK_S01_TEXT_FORMAT_TBL01 INDEX_LANGUAGE_LABEL
UK_S01_TEXT_FORMAT_TBL01 INDEX_TEXT_FORMAT_COUNTER
UK_S01_TEXT_FORMAT_TBL01 INDEX_PROVIDER_ID
UK_S01_TEXT_FORMAT_TBL01 INDEX_TARIFF_PLAN_COSP_ID
with field INDEX_PROVIDER_ID allowing NULL values. Actually we insert empty strings in there, but as far as I understand Oracle will convert it sliently in a NULL value, which is fine to our application.
When we apply a change on that table (either update or delete) we get errors at streams level and the transaction is not propagated.
Local Transaction ID: 6.28.11170
Source Commit SCN: 25397175
Source Commit Time: Dec-03-2012 12:21:30
Error in Message: 1
Error Message: ORA-26787: The row with key ("INDEX_LANGUAGE_LABEL", "INDEX_PROVIDER_ID", "INDEX_TARIFF_PLAN_COSP_ID", "INDEX_TEXT_FORMAT_COUNTER", "INDEX_TEXT_FORMAT_ID", "SOGID") = (ITALIAN, , , 0, MIKE, 124) does not exist in table
SMS.S01_TEXT_FORMAT_TBL
ORA-01403: no data found
message: 1
TableName: S01_TEXT_FORMAT_TBL
Operation Type: DELETE
_____ Old Data _____
SOID : 1010000008
SOGID : 124
INDEX_TEXT_FORMAT_ID : MIKE
INDEX_LANGUAGE_LABEL : ITALIAN
INDEX_TEXT_FORMAT_COUNTER : 0
TEXT_FORMAT : Hai raggiunto i 100MB di traffico incluso nello scatto
APPLICA_PERIOD_CRI_ID :
INDEX_TARIFF_PLAN_COSP_ID :
INDEX_PROVIDER_ID :
If I force the set of primary keys to be only the NOT NULL fields, I can successfully apply the error, but since we may have them storing both NULL and NOT NULL values, this is not a solution.
I'm wondering why the DB on one hand converts the empty string in a NULL while inserting, but it looks the Apply process onStandby is not able to do the same when looking for the record before applying the transaction.
Thanks in advance!
Cheers,
MikeIts showing all objects the user has permission to see- why does that need to be restricted?
-
SQL errors in SMS_STATE_SYSTEM - Trying to write NULL values to PropertyLocale
Hi!
We are getting a lot of the following error in the SMS_STATE_SYSTEM:
Microsoft SQL Server reported SQL message 515, severity 16: [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow
nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
I understand what this message means but i cant find which applications are causing the problem.
(actually i think I do but I still get the error messages after deleting them..)
It seems it's trying to write NULL-values twice every 5 minutes, but from "where"? What is telling it to update the row with a NULL value?Here are part of the statesys.log - It's not very helpful ;)
Seems it's the 'Update Application Catalog Tables'-task who is responsible for the mess.. But it does not say anything about the application..
Started task 'Update Application Catalog Tables'
SMS_STATE_SYSTEM 03.02.2014 16:18:14
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:18:29
4744 (0x1288)
*** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
SMS_STATE_SYSTEM 03.02.2014 16:18:29
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:18:29
4744 (0x1288)
*** [24000][0][Microsoft][SQL Server Native Client 11.0]Invalid cursor state
SMS_STATE_SYSTEM 03.02.2014 16:18:29
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:18:33
4744 (0x1288)
*** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
SMS_STATE_SYSTEM 03.02.2014 16:18:33
4744 (0x1288)
Task 'Update Application Catalog Tables' failed after running for 19 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:18:33
4744 (0x1288)
Will sleep until task 'Update NAP Restriction Error Summary' is due in 220 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:18:33
4744 (0x1288)
Main thread waiting for file change notification or timeout after 220 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:18:33
4744 (0x1288)
Inbox notification triggered, pause for 10 seconds....
SMS_STATE_SYSTEM 03.02.2014 16:19:53
4744 (0x1288)
Found new state messages to process, starting processing thread
SMS_STATE_SYSTEM 03.02.2014 16:20:03
4744 (0x1288)
Thread "State Message Processing Thread #0" id:3088 started
SMS_STATE_SYSTEM 03.02.2014 16:20:03
3088 (0x0C10)
total chucks loaded (1) SMS_STATE_SYSTEM
03.02.2014 16:20:03 3088 (0x0C10)
total chucks loaded (0) SMS_STATE_SYSTEM
03.02.2014 16:20:03 3088 (0x0C10)
Thread "State Message Processing Thread #0" id:3088 terminated normally
SMS_STATE_SYSTEM 03.02.2014 16:20:03
3088 (0x0C10)
CThreadMgr::ThreadTerminating - All threads have stopped running
SMS_STATE_SYSTEM 03.02.2014 16:20:03
3088 (0x0C10)
Found new state messages to process, starting processing thread
SMS_STATE_SYSTEM 03.02.2014 16:21:03
4744 (0x1288)
Thread "State Message Processing Thread #0" id:6468 started
SMS_STATE_SYSTEM 03.02.2014 16:21:03
6468 (0x1944)
total chucks loaded (1) SMS_STATE_SYSTEM
03.02.2014 16:21:03 6468 (0x1944)
total chucks loaded (0) SMS_STATE_SYSTEM
03.02.2014 16:21:03 6468 (0x1944)
Thread "State Message Processing Thread #0" id:6468 terminated normally
SMS_STATE_SYSTEM 03.02.2014 16:21:03
6468 (0x1944)
CThreadMgr::ThreadTerminating - All threads have stopped running
SMS_STATE_SYSTEM 03.02.2014 16:21:03
6468 (0x1944)
Started task 'Update NAP Restriction Error Summary'
SMS_STATE_SYSTEM 03.02.2014 16:22:18
4744 (0x1288)
Task 'Update NAP Restriction Error Summary' completed successfully after running for 15 seconds, with status 0.
SMS_STATE_SYSTEM 03.02.2014 16:22:33
4744 (0x1288)
Will sleep until task 'Update Application Catalog Tables' is due in 60 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:22:33
4744 (0x1288)
Main thread waiting for file change notification or timeout after 60 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:22:33
4744 (0x1288)
Inbox notification triggered, pause for 10 seconds....
SMS_STATE_SYSTEM 03.02.2014 16:23:20
4744 (0x1288)
Found new state messages to process, starting processing thread
SMS_STATE_SYSTEM 03.02.2014 16:23:30
4744 (0x1288)
Thread "State Message Processing Thread #0" id:4076 started
SMS_STATE_SYSTEM 03.02.2014 16:23:30
4076 (0x0FEC)
total chucks loaded (1) SMS_STATE_SYSTEM
03.02.2014 16:23:30 4076 (0x0FEC)
total chucks loaded (0) SMS_STATE_SYSTEM
03.02.2014 16:23:30 4076 (0x0FEC)
Thread "State Message Processing Thread #0" id:4076 terminated normally
SMS_STATE_SYSTEM 03.02.2014 16:23:30
4076 (0x0FEC)
CThreadMgr::ThreadTerminating - All threads have stopped running
SMS_STATE_SYSTEM 03.02.2014 16:23:30
4076 (0x0FEC)
Started task 'Update Application Catalog Tables'
SMS_STATE_SYSTEM 03.02.2014 16:23:45
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:24:00
4744 (0x1288)
*** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
SMS_STATE_SYSTEM 03.02.2014 16:24:00
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:24:00
4744 (0x1288)
*** [24000][0][Microsoft][SQL Server Native Client 11.0]Invalid cursor state
SMS_STATE_SYSTEM 03.02.2014 16:24:00
4744 (0x1288)
*** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
SMS_STATE_SYSTEM 03.02.2014 16:24:04
4744 (0x1288)
*** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
SMS_STATE_SYSTEM 03.02.2014 16:24:04
4744 (0x1288)
Task 'Update Application Catalog Tables' failed after running for 19 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:24:04
4744 (0x1288)
Found new state messages to process, starting processing thread
SMS_STATE_SYSTEM 03.02.2014 16:24:49
4744 (0x1288)
Thread "State Message Processing Thread #0" id:6800 started
SMS_STATE_SYSTEM 03.02.2014 16:24:49
6800 (0x1A90)
total chucks loaded (1) SMS_STATE_SYSTEM
03.02.2014 16:24:49 6800 (0x1A90)
total chucks loaded (0) SMS_STATE_SYSTEM
03.02.2014 16:24:49 6800 (0x1A90)
Thread "State Message Processing Thread #0" id:6800 terminated normally
SMS_STATE_SYSTEM 03.02.2014 16:24:49
6800 (0x1A90)
CThreadMgr::ThreadTerminating - All threads have stopped running
SMS_STATE_SYSTEM 03.02.2014 16:24:49
6800 (0x1A90)
Will sleep until task 'Update NAP Restriction Summary' is due in 16 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:26:04
4744 (0x1288)
Main thread waiting for file change notification or timeout after 16 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:26:04
4744 (0x1288)
Inbox notification triggered, pause for 10 seconds....
SMS_STATE_SYSTEM 03.02.2014 16:26:20
4744 (0x1288)
Started task 'Update NAP Restriction Summary'
SMS_STATE_SYSTEM 03.02.2014 16:26:30
4744 (0x1288)
Task 'Update NAP Restriction Summary' completed successfully after running for 15 seconds, with status 0.
SMS_STATE_SYSTEM 03.02.2014 16:26:45
4744 (0x1288)
Will sleep until task 'Update Application Catalog Tables' is due in 139 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:26:45
4744 (0x1288)
Main thread waiting for file change notification or timeout after 139 seconds.
SMS_STATE_SYSTEM 03.02.2014 16:26:45
4744 (0x1288) -
Null Values from a Data Source
This is more of an implementation question than a
troubleshooting question. Also, since I've been unable to find any
documentation on this I was wondering if anyone has come across
this behavior or found a bug with it.
Yesterday I was working on an application to explore some
proof of concept aspects of Flex for an application I'm developing.
I started running into a problem with Flex Data Services throwing
back an 'Unknown Property: "clientaddress1"' error whenever I tried
to update data. It seemed that whenever I tried to update a record
in the database it would thrown the Unknown Property error. I spent
a good chunk of the day trying to figure out what was causing this
and finally gave up and called it a day.
This morning I was reassessing what the problem was and
trying to find the differences between my database and my code and
I stumbled upon the fact that I could add no records and modify
them without a problem, however if I tried to access an existing
record and update it I'd get the Unknown Property error.
I start analyzing the database and found that I'd configured
the database to use null values for empty values and the records
that I created with the database had null values, however, any of
the values inserted from Flex were inserted as blank values. As
matching my action script class as clientaddress1 = ""; So, upon
further testing I fould that Flex was not processing the null
values correctly, so that when it came back and rightly generated a
Conflict Error...and then called AcceptServer() it was unable to
find the clientaddress1 property of the class.
Also, if any of the properties in the database are null it
throws the same error. Basically it seems to have invalidated the
object just because one value was null. So if all of my values from
the DB are set to something and only one field is set to null it's
still throwing the error on the first alphabetical item of the
properties.
I can resolve the problem by not using null values in the
database, but...what sort of effect would this have on someone
working with a large legacy database that extensively uses nulls
for undefined values?
Also, if a Flex guru could explain the reasoning for this
happening I would greatly appreciate it!
Best regards,
Chris MaloneyI realize that I didn't clarify that I am using ColdFusion
for getting the data. This class was generated by the Create CFC
wizard in Flex Builder.
package com.generated
[Managed]
[RemoteClass(alias="components.generated.clients.Clients")]
public class Clients
public var clientid:Number = 0;
public var clientfirstname:String = "";
public var clientlastname:String = "";
public var clientaddress1:String = "";
public var clientaddress2:String = "";
public var clientcity:String = "";
public var clientstate:String = "";
public var clientzip:String = "";
public var clientphone:String = "";
public var clientemail:String = "";
public function Clients()
} -
Need help Take out the null values from the ResultSet and Create a XML file
hi,
I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
null values to XML File. When i run the program it works alright and adds the null and not null values to
the file. But when i pass the boolean value to take out the null values it would not take it out and adds
the null and not null values.
Please look at the code i am posing. I am showing step by step where its not adding the null values.
Any help is always appreciated.
Thanks in advance.
============================================================================
Frame1 Class
============
public class Frame1 extends JFrame{
private JPanel contentPane;
private XQuery xQuery1 = new XQuery();
private XYLayout xYLayout1 = new XYLayout();
public Document doc;
private JButton jButton2 = new JButton();
private Connection con;
private Statement stmt;
private ResultSetToXML rstx;
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
xQuery1.setSql("");
xQuery1.setUrl("jdbc:odbc:SCANODBC");
xQuery1.setUserName("SYSDBA");
xQuery1.setPassword("masterkey");
xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
contentPane.setLayout(xYLayout1);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
jButton2.setText("Get XML from DB");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException ex) {
System.err.print("ClassNotFoundException: ");
System.err.println(ex.getMessage());
try {
con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
stmt = con.createStatement();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton2_actionPerformed(e);
contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton2_actionPerformed(ActionEvent e) {
try{
OutputStream out;
XMLOutputter outputter;
Element root;
org.jdom.Document doc;
root = new Element("PINFO");
String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
ResultSet rs = stmt.executeQuery(query);
/*===========This is where i am passing the ResultSet and boolean=======
===========value to either add the null or not null values in the file======*/
rstx = new ResultSetToXML(rs,true);
} //end of try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
======================================================================================
ResultSetToXML class
====================
public class ResultSetToXML {
private OutputStream out;
private Element root;
private XMLOutputter outputter;
private Document doc;
// Constructor
public ResultSetToXML(ResultSet rs, boolean checkifnull){
try{
String tagname="";
String tagvalue="";
root = new Element("pinfo");
while (rs.next()){
Element users = new Element("Record");
for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
tagname= rs.getMetaData().getColumnName(i);
tagvalue=rs.getString(i);
System.out.println(tagname);
System.out.println(tagvalue);
/*============if the boolean value is false it adds the null and not
null value to the file =====================*/
/*============else it checks if the value is null or the length is
less than 0 and does the else clause in the if(checkifnull)===*/
if(checkifnull){
if((tagvalue == null) || tagvalue.length() < 0 ){
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
root.addContent(users);
out=new FileOutputStream("c:/XMLFile.xml");
doc = new Document(root);
outputter = new XMLOutputter();
outputter.output(doc,out);
catch(IOException ioe){
System.out.println(ioe);
catch(SQLException sqle){Can someone please help me with this problem
Thanks.
Maybe you are looking for
-
JRE error when starting runInstaller on Solaris 8
Help! I'm getting the following error when I try to start ./runInstaller : "The Java Runtime Environment was not found at /tmp/OraInstall/jre/bin/jre. Hence, the Oracle Universal Installer cannot be run. Please visit http://www.javasoft.com and insta
-
How to stop Windows from mounting a usb fat32 flash drive
Here's the problem. I have 4 identical Sandisk Cruiser 32GB flash drives. Windows has never mounted these drives in the past, until several months ago. Now Windows is mounting 2 of these drives but not the other 2. When the drives get mounted I end
-
Hi folks. I'm trying to set up this ancient eMac for my mom. It had been running 10.3 or something, but I seem tyo recall it being wierd in that I couldn't get Safari (of all things) to run on it. So the other day, I put it in target disk mode and us
-
Host requires administrator name and password
I just updated a program on my Mac. It is giving me a message "this host requires an administrator name and password". The username and password I have always used are not working. It is telling me "invalid username or password". Any ideas on thi
-
WEBI above universe - hierarchy restriction
Hello, I read that the authorization concept in WEBI above universe works if we build a universe above a query and we use authorization variable. But what is the case for restriction by a hierarchy? For this restriction in the Query designer there is