Sunday, March 11, 2012

.net - can not connect to oracle server via my web hosting..

Problem
.net - can not connect to oracle server via my web hosting..

Impact
Can't fetch any data from the server and on the webpage it shows an error.

Solution
oracle support was deprecated by the Microsoft.
so what we use on our local machine is the oracle support for the .net
as it is the third party add-on so no hosting company provides oracle support as it may be unsafe.
so to have oracle support you must buy an dedicated server then your hosting company will do anything that you tell them to do and will install all your add-on.
but if you still want to use oracle on your shared hosting you can but you need to have permission to have trustlevel "full" over the server. and then if you have that you can upload dlls for oracle in to your bin folder and your web.config file should point to these dlls.
Working with these dlls will be quite tricky as there are  7 dlls that you need to upload on the server and still it doesn't support some functionality like ADDWITHVALUE function for parameters.
 and you will face some problem while working with int parameter.
but the way is to use for that is don't use parameters and build a query using sting and it is really unsafe to and easy to hack.

.net - repeter - can not see updated records after inserting a new record

Language--> C#, asp.net
Framework -> .net Framework 4.0
Problem-

can not see updated records after inserting a new record
Impact-
Users Can not see new records and inserts multiple records
Solution--
After successful insertion of record you need to rebind the repeater or any other data-bound controls.
And you must see all the new data inserted by the user.
And not only after inserting after each SQL statement  you fire on database. you Must rebind your control.

Kohana- Can not find specified Class

Language - PHP
Framework - Kohana

Problem - Can not find specified class.


Impact -
can not call needed class.

Solution -
Kohana supports vary rigid file system
so if your classname is Controller_Dummy_Demo
then your class must be under this path controller/dummy/demo.php
and  your class name should also be using "_" and first letter of each word must be capital