Breaking News

Editors Picks

Wednesday, October 31, 2012

MySQL Database Backup using mysqldump command



MySQL Database Backup using mysqldump command.
·          
MySQL provide a great command line utility to take backup of your MySQL database and restore it. mysqldump command line utility is available with MySQL installation (bin directory) that can be used to achieve this.
1. Getting backup of a MySQL database using mysqldump.
Use following command line for taking backup of your MySQL database using mysqldump utility.

mysqldump –u[user name] –h[hostname] –p[password] [database name] > [dump file]
Example:

   mysqldump –uroot –hlocalhost –prootpassword test > D:/test.sql


2. Restoring MySQL database.
The mysqldump utility is used only to take the MySQL dump. To restore the database from the dump file that you created in previous step, use mysql command.
mysql -u[username] –h[hostname] –p[Password] [database name] < [dump file]
Example:
mysql -uroot –hlocalhost -prootpassword test < D:/test.sql

Do you know the other uses of mysqldump utility?

Read more ...

Tuesday, October 9, 2012

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

While you are trying to read a CSV file and trying to get the data in a Dataset using Microsoft Text Driver in your 64 bit machine, you will be shown an error message as:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Try the solution as I do. It worked for me:
1. Go to IIS and Application Pools in the left menu.
2. Click the project name in the listing.
3. Click the Set Application Pool Defaults.
4. In General Tab, make the Enable 32 Bit Application entry to "True"


Now it works.
Read more ...

Monday, August 6, 2012

Asp.Net Bind MSChart with Dataset and handle Click event of the chart


Introduction       
                  
        This tutorial uses the new MS Chart click event to render a column graph from a Data Table in C# and ASP.NET 2.0 to 4.0

Description
In this tutorial, we will be looking at the new addition to the .NET Framework, MS Charts click event. We will be rendering a bar chart from a Data Table and then click event of that bar chart, and show just how easy.
Before we begin anything, and even start up Visual Studio.NET, we first need to download and install the Chart extension. You can download from the above web address, and the install is a quick process - consisting of two axes. Once installed, we can start up Visual Studio and create a new Web Application. Then the first thing to do is add two references in the Web.config:
In system.web/http Handlers, add the following:
<httpHandlers>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    </httpHandlers>



Read more ...

Wednesday, August 1, 2012

Asp.Net Column Chart from DataTable in MSChart C#


Introduction                          
        This tutorial uses the new MS Chart to render a column graph from a Data Table in C# and ASP.NET 2.0 to 4.0
Description

In this tutorial, we will be looking at the new addition to the .NET Framework, MS Charts. We will be rendering a bar graph from a Data Table, and show just how easy Microsoft make it for us to do so. We can use the Chart control like other ASP.NET data controls, and assign it a data source.
Please note that MS Chart will not work in ASP.NET 2.0 and below. If you are working within 3.5 or 4.0, then you can download the MS Chart extension at the following
We will programmatically instantiate and populate a Data Table on page load. In a real-world application, the chart would be fed with data from an external source, like a database or XML file.
There is not just one way to render a Chart in ASP.NET. Using MS Chart, we can either give it a data source like any other data control or we can loop through the data values and plot each point on the graph individually. In this example, we will show you both ways.

Before we begin anything, and even start up Visual Studio.NET, we first need to download and install the Chart extension. You can download from the above web address, and the install is a quick process - consisting of two axes.Once installed, we can start up Visual Studio and create a new Web Application. Then the first thing to do is add two references in the Web.config:
In system.web/http Handlers, add the following:
For .net framework 3.0 and 3.5
<httpHandlers>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>

For .net framework 4.0
<httpHandlers>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    </httpHandlers>

Read more ...

Error executing child request for ChartImg.axd


Introduction                          
        Error executing child request for ChartImg.axd.
Description

 An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Error executing child request for ChartImg.axd.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Read more ...

Grid layout with Background Image in WPF

Introduction                              

The grid is a layout panel with Background Image that arranges its child controls in a tabular structure of rows and columns. Its functionality is similar to the HTML table but more flexible. A cell can contain multiple controls; they can span over multiple cells and even overlap themselves.

Description

To add controls to the grid layout panel just put the declaration between the opening and closing tags of the Grid. Keep in mind that the row- and column definitions must precced any definition of child controls.
The grid layout panel provides the two attached properties Grid. Column and Grid. Row to define the location of the control.

Read more ...

Tuesday, July 31, 2012

Asp.net - display progress bar button click asp net

Introduction
                        This article is about showing load progress using jQuery and JavaScript. Often we perform high bandwidth operations like file upload, etc. To give a bit of relief to the website user, we need to show that something is happening. The best way is to show a progress message using JavaScript with overlay fade effect in the client area of browser.

Description

To show progress bar using jQuery, I'm using one .JS files. The .JS file is the latest version of jQuery file downloaded from Demo Code.CSS part which is used for styling overlay fade effect and progress message box style. A GIF image is used to make the progress box more effective.
Progress bar using jQuery can be attached with server side ASPX controls as well as HTML controls. For example, ASPX Link Button, Hyperlink, Menu, Button, Dropdown List, List Box, etc. and HTML Anchor, Select, Input, etc.




Read more ...

draggable div using javascript


Introduction
                              How to implement a simple script to drag elements in a web page. So in this post I want to illustrate the simplest method I know and use to drag everything in asp.net pages, using just three rows of JavaScript code.

In this post I provided a very basic script quick to reuse and customize in your web projects (in the live preview I added some little additional features respect the content of this tutorial.

Description
                        Have you ever tried doing some animation using JavaScript or moving DIVs here well, you know then how much pain it is as not only you have to tackle the difficult part of animation but also making it cross browser compatible.
Well you probably know why I am stretching up so hard is just to tell you how easy it is to use jQuery and JavaScript and do some really fantastic things without even bothering of knowing how it is done internally
In this small note, I will show you how to do Dragging of a DIV using jQuery and JavaScript. I will show you the demo of a DIV, which can be dragged here and there.

Call this JavaScript function on div then this div is movable


<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="moovPU.js" type="text/javascript"></script>
ondblclick='void(0);' onmouseover='over=true;' onmouseout='over=false;'
 
Read more ...

MySQL Split String Function

Introduction
                              MySQL Split String Function
MySQL does not include a function to split a delimited string. However, it’s very easy to create your own function.

Description
                        The following example function takes 2 parameters, performs an operation using an SQL function, and returns the result.

Call this function


CALL split_string(@customers,",");
SET @Cust = (SELECT VALUE FROM SplitValues WHERE LTRIM(RTRIM(VALUE)) = newcoustomer);


DELIMITER $$
CREATE DEFINER=`User`@`localhost` FUNCTION `split`(sStringIn TEXT,splitChar VARCHAR(1)) RETURNS TEXT CHARSET latin1
    NO SQL
BEGIN
DECLARE comma INT DEFAULT 0;
DECLARE mylist TEXT DEFAULT sStringIn;
DECLARE temp TEXT DEFAULT '';
DECLARE strlen INT DEFAULT LENGTH(sStringIn);
DECLARE outtext TEXT(10000) DEFAULT '';
SET comma = LOCATE(splitChar,mylist);
SET outtext='';
WHILE strlen > 0 DO
IF comma = 0 THEN
SET temp = TRIM(mylist);
SET mylist = '';
SET strlen = 0;
END IF;
IF comma != 0 THEN
SET temp = TRIM(SUBSTRING(mylist,1,comma-1));
SET mylist = TRIM(SUBSTRING(mylist FROM comma+1));
SET strlen = LENGTH(mylist);
END IF;
IF temp != ''
THEN
SET outtext = CONCAT(outtext,' and Path not like ',CHAR(39),CHAR(37),temp,CHAR(37),CHAR(39));
END IF;
SET comma = LOCATE(splitChar,mylist);
END WHILE;
RETURN outtext;
END$$
DELIMITER ;

Read more ...

Contact Us

Name

Email *

Message *