VBA Equivalent for DoCMD.TransferText

  • Please note:  I know this isn't a .Net forum, but just curious if there is something I call that exists in SQL Server from my .Net application to do the same without the need to write my own routine.

    I have been asked to rewrite a VBA tool into a C# application, but came across a line of code that I am not sure how to do the same thing in C# as it is done in VBA.

    Here is the code currently being used in VBA:

    DoCmd.TransferText acExportDelim, "TEMP_Tracker Export Specification", "TEMP_Tracker", "\\BulkInsert\UtilityNotes.txt", True

    Is there an equivalent SQL Server routine I can use from .Net to perform the same routine?

    Any help on this is greatly appreciated 🙂

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I don't know VBA but, looking up the command, I'm thinking that BCP.EXE using the "query out" option might do it for you (and it's nasty fast).  I don't know how to call such things from C# because I don't ever use C#.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply