• Jeff Moden - Wednesday, June 13, 2018 7:43 AM

    sgmunson - Wednesday, June 13, 2018 6:45 AM

    s.dartis - Wednesday, June 13, 2018 6:41 AM

    Hi Steve and thanks for your help.
    I ve closed the connexion because i've found someone who had the same problem with vb and he said there was a bug with the OLEDB and it has to close and open again to make it works.

    But in both case it doesn't work, if i close or not the issue is the same, and even if i dont do the isnert, only the create table, all my columns will be on data type Standard instead of the data type i define.

    I really don't understand what's happening, if i run the create table with an incorrect datatype like this :
    Create table Feuil1(No_id testdatadatatype, valeur decimal(18,2)No_id int, valeur decimal(18,2))

    the request will fail so it means it has to receive a good datatype to work, but whatever correct datatype i ask, it will become Standard in Excel file.

    Then maybe you should try ODBC instead of OLEDB.   But even if that doesn't work, you really have to load the data all at the same time to have any shot.   I'd actually consider BULK OUTPUT first and then if that doesn't work, use SSIS instead.  Ultimately, though, if you can't use new tools, don't expect to accomplish much without copy and paste....

    Apologies for my ignorance.  What is "BULK OUTPUT"?  Is that an ODBC command?

    Should have said BCP...   got used to calling it that a long time ago, and the label stuck.   Best that BCP can do is create a CSV, but that may be sufficient for something this simple...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)