M
messageman
hi
I have the following code:
OleDbDataAdapter oleCmd = new OleDbDataAdapter("SELECT [Customer ID],
[Customer #], [Company], [Location] FROM [Sheet1$]", oleConn);
DataSet oDS = new DataSet();
oleCmd.Fill(oDS);
The connection string is perfect. no problem with that.
It ran very good until I got this file from the client. though it has
the same format and same alignment and same sheet number and etc., my
program would fail at the FILL line number.
the exception is
System.oledb.OledbException: No value given for one or more required
parameters.
Now comes the interesting part. if i SELECT ALL from this file and
copy and paste it in a new Excel file, and run my program it runs
Perfect as it is supposed to run.
what might have caused the problem ????
I checked the file, its the same data, no extremities.
is there some different format in the file i received, or if so how to
go about avoiding it. ??
please help.
thanks
messageman
I have the following code:
OleDbDataAdapter oleCmd = new OleDbDataAdapter("SELECT [Customer ID],
[Customer #], [Company], [Location] FROM [Sheet1$]", oleConn);
DataSet oDS = new DataSet();
oleCmd.Fill(oDS);
The connection string is perfect. no problem with that.
It ran very good until I got this file from the client. though it has
the same format and same alignment and same sheet number and etc., my
program would fail at the FILL line number.
the exception is
System.oledb.OledbException: No value given for one or more required
parameters.
Now comes the interesting part. if i SELECT ALL from this file and
copy and paste it in a new Excel file, and run my program it runs
Perfect as it is supposed to run.
what might have caused the problem ????
I checked the file, its the same data, no extremities.
is there some different format in the file i received, or if so how to
go about avoiding it. ??
please help.
thanks
messageman