CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    West Australia
    Posts
    7

    Data type conversion error

    I have been able to export records from a database using an OleDb.OleDbConnection, writing to a text file and then converting it to an MS Excel format file. Then I am able to import all the data from the Excel file back into a Dataset or DataTable successfully. The problem is I cannot save it back to the original table as the Integer fileds have been converted to doubles namely the auto increment field and a couple of others. I get a datatype conversion error. Is there any succesful way of doing an export/import routine from a database to MS Excel?
    Your help would be appreciated greatly. Cheers!!

  2. #2
    Join Date
    May 2002
    Location
    Toronto
    Posts
    167
    Why don't you just change them back to Integers before you save them ?

  3. #3
    Join Date
    Nov 2005
    Posts
    11

    Re: Data type conversion error

    Hi Spiderbyte,

    Can I have the vb.net script which export records from a database using an OleDb.OleDbConnection, writing to a text file.

    Thank you.

    Regards,
    Eileen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured