Geeks With Blogs
Jeff Krebsbach April 2010 Entries
.Net oracle parameter order
Using the ODAC (Oracle Data Access Components) downloaded from Oracle to talk to a handfull of Oracle DBs - Was putting together my DAL to update the DB, and things weren't working as I hoped - UPDATE foo SET bar = :P_BAR WHERE bap = :P_BAP I assign my parameters - objCmd.Parameters.Add(objBap); objCmd.Parameters.Add(objBar); Execute update command - int result = objCmd.ExecuteNonQuery() and result is zero! ... Is my filter incorrect? SELECT count(*) FROM foo WHERE bap = :P_BAP ...result is one... ......

Posted On Sunday, April 25, 2010 10:35 AM

Oracle Sequences
Reminder to myself - SQL Server has nice index columns directly tied to their tables. Oracle has sequences that are islands to themselves. select seq_name.currval from dual; select seq_name.nextval from dual; currval - return current number at top of sequence nextval - increment sequence by 1, return new number therefore - to create functionality in oracle similar to an index column - OPTION A) - Create insert trigger: CREATE OR REPLACE TRIGGER dept_bir BEFORE INSERT ON departments FOR EACH ROW WHEN ......

Posted On Wednesday, April 7, 2010 8:48 PM

Copyright © jkrebsbach | Powered by: GeeksWithBlogs.net | Join free