Posts

Dot Net - Dataset - retrieving from sys_refcursor Oracle Package

Image
First, I am not sure if this is really a problem or just an issue with my understanding of some issues. Essentially, I was trying to access an ORACLE STORED PROCEDURE in a PACKAGE. The procedure returns a sys_Refcursor parameter - which simply means, it is weakly typed. Creating a Table Adapter in VS2010 and making the appropriate references did not go on as I had anticipated. Normally, if you bind a procedure to a TableAdapter, it should generate the column list automatically as well as the parameter list - if any. However, I noticed that this was not the case for the sys_Refcursor type parameter procedure. I actually think - it's got nothing to do with the sys_refcurson type but a problem with the way the procedure name is generated with some funny escape characters. Either way, you can get around this issue following the steps described in this article. Once you have this situation, the column list is not automatically generated for the Data table, neither is the paramet...

WCF Service - Using Datasets

There are a lot of articles out there on why it is not a good practice to use "Dataset" type in WCF. Basically, it is platform dependent and if the web service were to be consumed from another platform other than Windows, there could be an issue of data compatibility. There are two possible ways of getting around this - serializing and compressing the dataset using the WriteToXML method and then compressing with gzip or using a collection of a data class made up of primitive data types. For strictly Windows based platform, you could use Dataset type and have something liek this : [ServiceContract] public interface IContactManager { [OperationContract] DataSet GetContacts(); [OperationContract] void UpdateContact(int id, string name, string phone); } public class ContactManager: IContactManager { public DataSet GetContacts() { return _contacts; } public void UpdateContact(int id, string name, string phone) { var row = _con...

Remove Oracle manually

Have you ever had the challenge of trying to remove Oracle using the universal installer with no success? Well, try removing Oracle manually. Removing Oracle Keys from the Microsoft Registry Editor Oracle Universal Installer creates Windows services for Oracle components during installation but it does not delete all the services created by Oracle Net Configuration Assistant and Oracle Database Configuration Assistant during deinstallation. In addition, Oracle Universal Installer does not delete several other registry editor keys. You need to remove any existing registry keys manually by following the instructions in one of the following sections: Removing the Oracle Net Service Registry Key Removing All Oracle Registry Keys Caution: Use Microsoft Registry Editor at your own risk. Incorrectly using the Registry Editor can cause serious problems and may require reinstallation of your operating system. Removing the Oracle Net Service Registry Key To remove only the Oracle Net...

ORACLE TNS Configuration

TNS Connections The TNS connection type is an appropriate option in any of the following circumstances: You have an Oracle client installed on your machine. You have access to many Oracle Database instances. You do not know the machine details of the system hosting the Oracle Database instance you want to connect to. A TNS connection uses an alias entry from a tnsnames.ora file. Oracle SQL Developer uses only one tnsnames.ora file. You may have more than one on your local machine or want to use the tnsnames.ora file on a remote machine, so note that Oracle SQL Developer looks sequentially for the tnsnames.ora file in the following locations: $HOME/.tnsnames.ora $TNS_ADMIN/tnsnames.ora /etc/tnsnames.ora (non-Windows systems) $ORACLE_HOME/network/admin/tnsnames.ora Registry key On Windows systems, if a tnsnames .ora file exists but Oracle SQL Developer isn't using it, create a TNS_ADMIN environment variable via Control Panel -> System -> Advanced -> Envir...

Decompiling Delphi - 3

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. continued from part two The art of reverse engineering has traditionally been the land of technical wizards, familiar with assembly language and debuggers. Several Delphi decompilers have appeared that allow anybody, even with limited technical knowledge, to reverse engineer most Delphi executable files. If you are interested in reverse engineering Delphi programs I suggest you to take a look at the following few "decompilers": IDR (Interactive Delphi Reconstructor) A decompiler of executable files (EXE) and dynamic libraries (DLL), written in Delphi and executed in Windows32 environment. Final project goal is development of the program capable to restore the most part of initial Delphi source codes from the compiled file but IDR, as well as others Delphi decompilers, cannot do it yet. Nevertheless, IDR is in a status considerably to facilitate such process. In co...

Decompiling Delphi - 2

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. continued from part one For the moment, Borland does not offer any product capable of decompiling an executable (.exe) file or the "Delphi compiled unit" (.dcu) back to the original source code (.pas). Delphi compiled unit: DCU When a Delphi project is compiled or run a compiled unit (.pas) file is created. By default the compiled version of each unit is stored in a separate binary-format file with the same name as the unit file, but with the extension .DCU. For example unit1.dcu contains the code and data declared in the unit1.pas file. This means that if you have someones, for example, component compiled source all you have to do is to reverse it and get the code. Wrong. The DCU file format is undocumented (proprietary format) and may change from version to version. After the compiler: Delphi Reverse Engineering If you would like to try to decompile a Delphi e...

Decompiling Delphi - 1

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. Decompilation? Reverse? Cracking?` Simply speaking, decompilation is the inverse of compilation: translating an executable file into a higher level language. Suppose you lose your Delphi project's source and you only have the executable file: reverse engineering (decompilation) is useful if the original sources are not available. Hm, "sources not available", does this mean that we can decompile other people's Delphi projects? Well, yes and no.. Is true decompilation possible? No, of course not. Fully automated decompilation is not possible - no decompiler could exactly reproduce the original source code. When a Delphi project is compiled and linked to produce a standalone executable file, most of the names used in the program are converted to addresses. This loss of names means that a decompiler would have to create unique names for all the constants, variab...