Working with array item in JavaScript

Hi,

Last day I was working with the some JavaScript and array. I was basically working with adding and deletion of the array item. In JavaScript we can add and delete Items in the array in the following way. 

               var exmapleArray = new Array("a", "b");

To add item at the end of the array we use the push method of the array object.

               exmapleArray.push("c"); 1

Continued...

Reading comma separated values for a CSV file

Hi

Yesterday I was working with some data and found the requirement to work with the CSV files. Al I had to do was read some CSV files. To read the CSV file I had to use Microsoft.Jet.OLEDB.4.0 provider.

I created a function that would take the file path as a parameter and return a dataset containing the table structure of the CSV file. Now the user can do what ever he wants to with this dataset. The function was something like this.

public DataSet getDataSet(string FilePath)

{

            DataSet ds=new DataSet();

            string ConnectionString, CommandText;

Continued...
 
Copyright © 2006 - 2008 Vikram Lakhotia