The ADO.NET team had posted an article about the System.Data.OracleClient component. This component is available in .NET 4.0 but it is deprecated. So the existing and new applications will still compile with warnings for the first time.
It has been recommended to make use of microsoft's parter component to substitute the System.Data.OracleClient.
One of the options to consider is using "ORACLE ODP.NET". This component has some issues with respect to performance, errors etc.,
Friday, June 19, 2009
Friday, June 12, 2009
Jquery Part 4 - AJAX method call through JQuery
The JQuery tool provides a very good, easy to use AJAX interface. I came across a scenario where this could be applied very well. Assume we have a web service that returns the XML data and we need to display the XML output in the web page when the user clicks a button without refresh. We make AJAX calls through JQuery to the server to invoke the web service as given below.

The above code has many components associated with it. $document.ready will determine whether the HTML is loaded completely and rendered. The next function $('#btn1').click will bind the click event to the function following that. So the scripts within the click function will execute when the user clicks the button btn1.
The next line indicates that we are making an ajax call to the web service url "
jqueryAjax.aspx/GetWebServiceResult". The type parameter indicates the request type GET/POST. The data parameter can be used to pass the input parameter to the server side method. In this example the server side method is GetWebServiceResult. So the method declaration will have a tag [WebMethod] on the method's declaration. This method expects an input parameter of type int and it will pass the parameter recieved from client into the web service. From the client side we will pass the value to this method through data parameter in JQuery.
The contentType and dataType parameter will indicate the type of data transferred between client and server.
When the button is clicked, the client side code will execute and invokes the server side method and pass the input parameter to fetch the result. The server side method in turn will invoke the web service and the result is passed in the object "msg". If the AJAX call is successful, the Success function is invoked. If the AJAX call is failed, the failure function will be invoked.
The BuildHTML method will parse the web service results and display in the HTML.
So it is EASY :), No More UpdatePanel, ScriptManager!!!

On the button click we need to load the web service data without a post back.
To do that we need to include the JQuery tool kit scripts in the project folder and set the reference to the scripts.
The above code has many components associated with it. $document.ready will determine whether the HTML is loaded completely and rendered. The next function $('#btn1').click will bind the click event to the function following that. So the scripts within the click function will execute when the user clicks the button btn1.The next line indicates that we are making an ajax call to the web service url "
jqueryAjax.aspx/GetWebServiceResult". The type parameter indicates the request type GET/POST. The data parameter can be used to pass the input parameter to the server side method. In this example the server side method is GetWebServiceResult. So the method declaration will have a tag [WebMethod] on the method's declaration. This method expects an input parameter of type int and it will pass the parameter recieved from client into the web service. From the client side we will pass the value to this method through data parameter in JQuery.
The contentType and dataType parameter will indicate the type of data transferred between client and server.
When the button is clicked, the client side code will execute and invokes the server side method and pass the input parameter to fetch the result. The server side method in turn will invoke the web service and the result is passed in the object "msg". If the AJAX call is successful, the Success function is invoked. If the AJAX call is failed, the failure function will be invoked.
The BuildHTML method will parse the web service results and display in the HTML.
So it is EASY :), No More UpdatePanel, ScriptManager!!!
Monday, June 1, 2009
WCF and RESTFul Service
I was attending few webminars and read materials over the past few weeks on the WCF fundamentals. One of the great feature with WCF is its ability to expose the services in RESTful format.
Saturday, May 30, 2009
SQL Server 2008 Training in Texas
The schedule for the SQL server 2008 training @ TCU Texas,
The registration can be made thrugh TCU's site. Click here to register
SQL Class Date:
June 20th from 9 am to 4 pm
June 21st from 1 pm to 5 pm
June 27th from 9 am to 4 pm
June 28th from 1 pm to 5 pm
The registration can be made thrugh TCU's site. Click here to register
SQL Class Date:
June 20th from 9 am to 4 pm
June 21st from 1 pm to 5 pm
June 27th from 9 am to 4 pm
June 28th from 1 pm to 5 pm
Thursday, May 7, 2009
PLINQO - Plano,TX Training updates
Yesterday i attended a .NET user group training in Plano, TX about the PLINQO demonstration. PLINQO stands for Professional LINQ to Objects.
The presenters did a great job of demonstrating the PLINQO libraries and its benefit over microsoftjavascript:void(0)'s LINQ.
The greates feature i liked about this component is its ability to dynamically sync up with the database object and Batch Querying.
To learn more about PLINQO please visit the website PLINQO
The presenters did a great job of demonstrating the PLINQO libraries and its benefit over microsoftjavascript:void(0)'s LINQ.
The greates feature i liked about this component is its ability to dynamically sync up with the database object and Batch Querying.
To learn more about PLINQO please visit the website PLINQO
Wednesday, May 6, 2009
ORACLE Fusion Dev platform
Oracle is hosting an event to demonstrate about their new product ORACLE FUSION Development Platform - ORACLE ADF 11g. This appears to be a full day event with demo, Q&A session. Click here to register and download material
Tuesday, May 5, 2009
JQuery - Part 3 Dynamic object loading
This post is about loading a control dynamically through Jquery scripts.
The powerful feature of Jquery selectors combined with CSS scripts enables the client side loading of controls with less coding/effort.
I recently incorporated this featur in one of the projects where we had a requirement to dynamically change the image at run time based on the result set from the database query. I would not want to write server side code to determine the image, Instead i started to research about loading the image through Jquery selectors.
The project required to load the image at one of the table column < td >.
I declared a placeholder client side div with a id "loadImage".
"< td >
< div id="loadImage" >
< %# DataBinder.Eval(Container.DataItem, "Flag").ToString().Trim()% >
< /div >
< /td >"
On the document ready event i wrote the Jquery funtion which will locate the position of the DIV and load the image on the particular DIV as below.
$(document).ready(function() {
$('#tbl_temp tr').each(function() {
var valueee = $(this).find('div');
var txt = jQuery.trim(valueee.text());
var imgSrc = "";
if (txt == 'G') {
imgSrc = 'images/green_icon.gif'
}
else if (txt == 'O') {
imgSrc = 'images/gray_icon.gif'
}
else {
}
if (imgSrc.length > 0) {
var img = new Image()
$(img) // once the image has loaded, execute this code
.load(function() {
//debugger;
$(this).hide();
valueee
.empty()
//.text = '';
// remove the loading class (so no background spinner),
// then insert our image
.append(this);
//debugger;
// fade our image in to create a nice effect
$(this).fadeIn();
}) // if there was an error loading the image, react accordingly
.error(function() {
// notify the user that the image could not be loaded
})
// set the src attribute of the new image to our image
.attr('src', imgSrc)
.css({ 'border': 'none' });
}
})
});
The powerful feature of Jquery selectors combined with CSS scripts enables the client side loading of controls with less coding/effort.
I recently incorporated this featur in one of the projects where we had a requirement to dynamically change the image at run time based on the result set from the database query. I would not want to write server side code to determine the image, Instead i started to research about loading the image through Jquery selectors.
The project required to load the image at one of the table column < td >.
I declared a placeholder client side div with a id "loadImage".
"< td >
< div id="loadImage" >
< %# DataBinder.Eval(Container.DataItem, "Flag").ToString().Trim()% >
< /div >
< /td >"
On the document ready event i wrote the Jquery funtion which will locate the position of the DIV and load the image on the particular DIV as below.
$(document).ready(function() {
$('#tbl_temp tr').each(function() {
var valueee = $(this).find('div');
var txt = jQuery.trim(valueee.text());
var imgSrc = "";
if (txt == 'G') {
imgSrc = 'images/green_icon.gif'
}
else if (txt == 'O') {
imgSrc = 'images/gray_icon.gif'
}
else {
}
if (imgSrc.length > 0) {
var img = new Image()
$(img) // once the image has loaded, execute this code
.load(function() {
//debugger;
$(this).hide();
valueee
.empty()
//.text = '';
// remove the loading class (so no background spinner),
// then insert our image
.append(this);
//debugger;
// fade our image in to create a nice effect
$(this).fadeIn();
}) // if there was an error loading the image, react accordingly
.error(function() {
// notify the user that the image could not be loaded
})
// set the src attribute of the new image to our image
.attr('src', imgSrc)
.css({ 'border': 'none' });
}
})
});
Subscribe to:
Posts (Atom)