Monday, November 12, 2012

vb .Net null check for objects

How to check Null objects in VB.Net?

Solution:

 If IsNothing(myObject) Then
           
           ' Some Code
                                                          
End If

Thursday, November 8, 2012

Creating Public Synonym in Oracle

In Oracle we can create the public synonyms for the tables which users of other schema can refer to without specifying any schema name. Its an alternative name for data objects.
 
This is specifically useful when we are creating a generic script and do not want it to be schema specific.

For example the table called "employee" in the following query can be accessed without having to prefix the table name with the schema named testschema:


create or replace public synonym employee for testschema.employee ;


To drop the synonym use the following :

drop public synonym employee;






Synonyms can also be used for views, sequences, stored procedures, and other database objects.