Click here to Skip to main content
15,887,392 members
Home / Discussions / C#
   

C#

 
AnswerRe: Session.clear ans session.abandon Pin
Guffa10-Sep-07 11:02
Guffa10-Sep-07 11:02 
AnswerRe: Session.clear ans session.abandon Pin
Guffa9-Sep-07 23:39
Guffa9-Sep-07 23:39 
GeneralRe: Session.clear ans session.abandon Pin
Sonia Gupta9-Sep-07 23:42
Sonia Gupta9-Sep-07 23:42 
QuestionWrong compilation error message Pin
vikben9-Sep-07 22:12
vikben9-Sep-07 22:12 
AnswerRe: Wrong compilation error message Pin
Pete O'Hanlon9-Sep-07 22:50
mvePete O'Hanlon9-Sep-07 22:50 
GeneralRe: Wrong compilation error message Pin
vikben9-Sep-07 23:44
vikben9-Sep-07 23:44 
GeneralRe: Wrong compilation error message Pin
Pete O'Hanlon10-Sep-07 1:25
mvePete O'Hanlon10-Sep-07 1:25 
QuestionHelp with C# generated Excel documents Pin
dadart9-Sep-07 22:01
dadart9-Sep-07 22:01 
I have 2 Excel files...

1. the original Excel file that was given to me to be converted to a dataset and so I could fill up the SQL Database.
2. the other is the one I retrieved from the database and then generated into an Excel document. used a similar procedure
to that of the tutorial here... a low-tech version of generating Excel files... using the XML spreadsheet style in one of the tutorials...

I open both Excel files (the original and generated excel file) and they look identical and they even contain the exact same data in each cells...

now here's the problem...I need to make a method that checks whether or not they're equivalent or not to see if any data is lost since checking each
cell of a large excel file would take a lot of time...

so I use OleDB that comes with C# Express since we're not suppose to use any 3rd party dlls...
for a temporary method to test whether they're equal is, I try to convert the 2 excel documents to 2 datasets and then compare the two generated datasets
whether or not they are equivalent to each other...


public static DataSet Method()
{
    string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FILE_PATH;Extended Properties=""Excel 8.0;HDR=YES;""";

    OleDbConnection conn = new OleDbConnection(connectionString);
    OleDbCommand cmd = new OleDbCommand("Select * from [Project List$]", conn);
    cmd.CommandType = CommandType.Text;
    OleDbDataAdapter myAdapter = new OleDbDataAdapter(cmd);
    DataSet ds = new DataSet();

    try
    {
        myAdapter.Fill(ds);
        return ds;
    }
    catch(OleDbException ex)
    {
        throw ex;
    }
}


the original converts to a dataset with no problem but when I try to convert the one generated from the database is catches an OleDbException...

OleDBException was caught:
External table is not in the expected format.

how come? and is there any word around to this problem without using any 3rd party dlls? or downloading any additional dlls from Microsoft?

so we tried another method... used XmlDocument to get the dataset... and then compared it to one another and yet they were not equal? any suggestions?
AnswerRe: Help with C# generated Excel documents Pin
Giorgi Dalakishvili9-Sep-07 22:17
mentorGiorgi Dalakishvili9-Sep-07 22:17 
QuestionNUnit tests issue [modified] Pin
Johan Lombaard9-Sep-07 21:53
Johan Lombaard9-Sep-07 21:53 
AnswerRe: NUnit tests issue Pin
Pete O'Hanlon9-Sep-07 22:44
mvePete O'Hanlon9-Sep-07 22:44 
GeneralRe: NUnit tests issue Pin
Johan Lombaard9-Sep-07 23:07
Johan Lombaard9-Sep-07 23:07 
GeneralRe: NUnit tests issue Pin
Pete O'Hanlon9-Sep-07 23:11
mvePete O'Hanlon9-Sep-07 23:11 
GeneralRe: NUnit tests issue Pin
Johan Lombaard10-Sep-07 0:56
Johan Lombaard10-Sep-07 0:56 
QuestionCant close serial port in windows form application Pin
bigbrownbeaver9-Sep-07 21:12
bigbrownbeaver9-Sep-07 21:12 
AnswerRe: Cant close serial port in windows form application Pin
c0ax_lx10-Sep-07 4:51
c0ax_lx10-Sep-07 4:51 
QuestionHow to set my own serial key Pin
Exelioindia9-Sep-07 20:59
Exelioindia9-Sep-07 20:59 
AnswerRe: How to set my own serial key Pin
Paul Conrad14-Sep-07 19:03
professionalPaul Conrad14-Sep-07 19:03 
QuestionI need DLL or Tools For Convert PDF to Image Pin
sakthi dasan9-Sep-07 20:42
sakthi dasan9-Sep-07 20:42 
Questionhelp with search program related to pdf files Pin
noobneedshelp9-Sep-07 20:36
noobneedshelp9-Sep-07 20:36 
Questioncross thread..? How to populated a textbox with serial input?I Pin
mercenary019-Sep-07 20:24
mercenary019-Sep-07 20:24 
AnswerRe: cross thread..? How to populated a textbox with serial input?I Pin
bigbrownbeaver9-Sep-07 21:11
bigbrownbeaver9-Sep-07 21:11 
GeneralRe: cross thread..? How to populated a textbox with serial input?I Pin
blackjack21509-Sep-07 21:21
blackjack21509-Sep-07 21:21 
GeneralRe: cross thread..? How to populated a textbox with serial input?I Pin
bigbrownbeaver9-Sep-07 21:59
bigbrownbeaver9-Sep-07 21:59 
GeneralRe: cross thread..? How to populated a textbox with serial input?I Pin
lmoelleb10-Sep-07 0:02
lmoelleb10-Sep-07 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.