Creating dynamic .mdb files ( MS Access 2002-2003 )

  • Hi,

    Im trying to see if creating .mdb files on the fly is possible at all(.mdb will be my destination and i wish to create a table in it too after the database file is created at runtime), im trying to implement this like one would create excel files on the fly at runtime with name and timestamp in it.

    Please suggest how this is doable. Thanks in advance.

  • harry.sh16 (8/29/2011)


    Hi,

    Im trying to see if creating .mdb files on the fly is possible at all(.mdb will be my destination and i wish to create a table in it too after the database file is created at runtime), im trying to implement this like one would create excel files on the fly at runtime with name and timestamp in it.

    Please suggest how this is doable. Thanks in advance.

    Hi,

    It is possible, but it requires programming. A simpler solution would be to keep on hand an empty MDB, without any tables that you will copy into your destination MDB file and then populate with required table(s).

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • I already have a package that loops through different (ADO) objects and loads 3 different excel destinations dynamically, need to change excel to access destination dynamically so that it can have current datetime values in it at runtime.

    Can someone please tell me how to go about doing this in detail.. Thanks

  • harry.sh16 (8/29/2011)


    I already have a package that loops through different (ADO) objects and loads 3 different excel destinations dynamically, need to change excel to access destination dynamically so that it can have current datetime values in it at runtime.

    Can someone please tell me how to go about doing this in detail.. Thanks

    You want someone to take you through the entire process of creating a package for your specific purpose, in detail? Sorry, but that's not how this forum works. We'll help you with specifics, but you'll have to do the work yourself, or pay someone else if you do not have the necessary time or abilities.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • No thats not what i want, i can do most of the stuff myself all i need to know is how to make/create a .mdb file dynamically on the fly just like one would create excels, a hint would do but if you cant answer it accept it and let others reply. Thanks

  • harry.sh16 (8/30/2011)


    No thats not what i want, i can do most of the stuff myself all i need to know is how to make/create a .mdb file dynamically on the fly just like one would create excels, a hint would do but if you cant answer it accept it and let others reply. Thanks

    Not a matter of ability at all. You're asking for expertise and specifics which tend to fall outside of the scope of "free help" (especially in an area where you might be pushing the limits on what should be done inside of SSIS). Making the request more specific would likely be better received. Keep in mind you might get a few minutes of each reader's time, so framing a question that might take hours of actual research, etc... won't get much traction.

    That said - the best solution has already been advanced (i.e. base your process on COPYING a blank MDB file rather than creating from scratch). If you insist on "creating" the MDB, then your package is going to include some custom scripting task which happens to run Office automation, which will introduce a lot of complexity, and frankly lots of opportunities to fail.

    after that you should simply have BOTH destinations set up (i.e. excel and ACCESS), which then will generate based on whatever conditions you pick.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Yep, OLE Automation is your answer. Look into creating Access databases programmatically. Presumably it can be adapted to SSIS but I've not done it except from VBA.

  • herladygeekedness (8/31/2011)


    Yep, OLE Automation is your answer. Look into creating Access databases programmatically. Presumably it can be adapted to SSIS but I've not done it except from VBA.

    How is this in any sense better than the option of copying an existing blank database? Is it simpler to set up? NO! Is it easier to maintain? NO! Is it more transparent? NO! Is it more efficient? Doubtful. So, in what way is OLE automation the "answer"?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Gees, Drew, sorry to piss you off so thoroughly.

    How is it better? it will work.

  • Copy operation doesnt work for .mdb files/databases using File System Task, so how would one copy databases in the first place??

  • harry.sh16 (8/31/2011)


    Copy operation doesnt work for .mdb files/databases using File System Task, so how would one copy databases in the first place??

    Why it doesn't work? It is a regular file, nothing special about it.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • herladygeekedness (8/31/2011)


    Gees, Drew, sorry to piss you off so thoroughly.

    Proffering bad advice does a disservice to everyone who reads these forums. I wanted to make absolutely clear that I considered the advice you gave to be bad, so that others reading this thread would less tempted to follow it.

    If you're convinced that it is good advice, feel free to disprove any of my points.

    How is it better? it will work.

    Since the other option also works, that's not sufficient.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 12 posts - 1 through 11 (of 11 total)

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