With the annoouncement from Microsoft on deprecating System.Data.OracleClient, i started to use Oracle client, ORACLE.DATAAccess and it has many uncovered challenges. i am posting one of the challange i faced in utilizing ORACLE.DATAAccess and the resolution.
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Finally got it resolved. The problem is the proc returns two parms as OUT - RAW and VARCHAR2.
From C#, we can pass input with VARCHAR2 and the size of VARCHAR2 is adjusted based on the input string length. But for the Output, C# allocates 0 bytes - so the step in the PROC that assigns value to the output parm is throwing this error.
To Fix this error i assigned the MAX length of VARCHAR2 for the OUT parm - eventhough i dont like it :) and it started to work.
So if you know the size of the output parameter, you can pass the size appropriately. but for arbitraty length output we may have to pass the max of datatypes's length.
Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Saturday, January 16, 2010
Wednesday, March 18, 2009
JQuery - Part 1
JQuery Fundamentals
Typically, the JavaScript was considered to be a clumpsy and difficult language to be used in the application development. The applications were designed to make use of javascript to support the validations, styles but the effort required to fix the browser compatibility superseded the benefit of client side scripting. Before the discovery of CSS the applications were developed by coupling the functionality and structure (HTML) together.
< type="button" id="”btnClick”" onclick="document.getElementById('txtName’).style.color='blue';">
Please click here
< / button>
The addition of CSS in the web development world allows us to separate the structure from the stylistic details of the HTML. It also gives us the flexibility to completely change the style by changing the different style sheet.
< type="text/javascript">
window.onload = function() {
document.getElementById(' btnClick ').onclick = ChangeColor;
};
Function ChangeColor ()
{
document.getElementByID(‘txtName’).style.color = “Blue”
}
< / script>
< type="button">
Please click here
In the above example, the structure is separated from functionality. This approach of separating the structure from functionality through javascript is called “Unobtrusive Javascript”
The JQuery drew a huge attention amongst developer for its ability to support the development of unobtrusive JavaScript’s. JQuery works very well with the HTML page and performing operations on the DOM elements with significantly less lines of code. The scripts developed in JQuery model works well in all major browsers.
JQuery has great features like
DOM Selectors
DOM manipulation
Animation
HTML traversing
Typically, the JavaScript was considered to be a clumpsy and difficult language to be used in the application development. The applications were designed to make use of javascript to support the validations, styles but the effort required to fix the browser compatibility superseded the benefit of client side scripting. Before the discovery of CSS the applications were developed by coupling the functionality and structure (HTML) together.
< type="button" id="”btnClick”" onclick="document.getElementById('txtName’).style.color='blue';">
Please click here
< / button>
The addition of CSS in the web development world allows us to separate the structure from the stylistic details of the HTML. It also gives us the flexibility to completely change the style by changing the different style sheet.
< type="text/javascript">
window.onload = function() {
document.getElementById(' btnClick ').onclick = ChangeColor;
};
Function ChangeColor ()
{
document.getElementByID(‘txtName’).style.color = “Blue”
}
< / script>
< type="button">
Please click here
In the above example, the structure is separated from functionality. This approach of separating the structure from functionality through javascript is called “Unobtrusive Javascript”
The JQuery drew a huge attention amongst developer for its ability to support the development of unobtrusive JavaScript’s. JQuery works very well with the HTML page and performing operations on the DOM elements with significantly less lines of code. The scripts developed in JQuery model works well in all major browsers.
JQuery has great features like
DOM Selectors
DOM manipulation
Animation
HTML traversing
Sunday, December 28, 2008
jQuery - The cool stuff
The introduction of jQuery and its support in Microsoft's visual studio gonna revolutionize the programmer world with its easy to use interface, built-in features to support cross-browser issues, CSS3 compliance etc., I realized the meaning of "The write less, Do More" after playing around with the jquery package :) . watch for More posts on this cool stuff - !!!!
Tuesday, October 7, 2008
Improving Website Performance - Part 3
Retrieve multiple resultsets from database
Design the app in such a way that the requestpath to database is very minimal. Each of the roundtrip decreases the number of requests per second the app can serve. Make sure to return the multiple resultset in single database request. It will enhance the performance as well as the scalability of the application.
Restrict the amount of data retrieved
The sql query or the stored procedure can be designed to restrict the number of results retrieved from the database. In other words the business logic should reside in the stored procedure or Sql query which might constraint a number of results returned from database.
Design the app in such a way that the requestpath to database is very minimal. Each of the roundtrip decreases the number of requests per second the app can serve. Make sure to return the multiple resultset in single database request. It will enhance the performance as well as the scalability of the application.
Restrict the amount of data retrieved
The sql query or the stored procedure can be designed to restrict the number of results retrieved from the database. In other words the business logic should reside in the stored procedure or Sql query which might constraint a number of results returned from database.
Subscribe to:
Posts (Atom)