Question : OleDbDataReader is skipping some values in my CSV file

I have some code that is parsing a CSV that a user uploads.  It's a way from the customer to keep their records up to date.  Anyways, everything seemed to be working fine but I noticed that none of the Canadian Zip Codes were coming over (going from CSV to SQL by the way).  When I parse through, the US zip codes pull fine from the CSV but the Canadian are blank.  I'll post some code that I am using, any help would be appreciated.

Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPath + ";Extended Properties='text;HDR=Yes;FMT=Delimited'";
        OleDbConnection conn = new OleDbConnection(strConn);
        conn.Open();
        try
        {
            OleDbCommand comm = new OleDbCommand("SELECT * from [" + strFilename + "]", conn);
            OleDbDataReader read = comm.ExecuteReader();

            while (read.Read())
            {
                xdlr = "HL" + read[0].ToString();
                xname = read[1].ToString();
                xaddr = read[3].ToString();
                xcity = read[4].ToString();
                xstate = read[5].ToString();
                xzip = read[6].ToString();
                xphone = read[7].ToString();
                xfax = read[8].ToString();
                xemail = read[9].ToString();
            }  
        }

Answer : OleDbDataReader is skipping some values in my CSV file

Is everything working as is or are you experiencing problems?

Are you using VLans?
What trunk mode is the 3560 set to on the connections to the dell?

What is your usage on the Link to the SGE 2002?


Random Solutions  
 
programming4us programming4us