Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    Unanswered: Programmatic Creation of mde

    Hi

    Does anyone out there know any programmatic alternatives to the RunCommand acCmdMakeMDEFile and Sendkeys method of creating an mde?

    Cheers
    Testimonial:
    pootle flump
    ur codings are working excelent.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hi pf,

    sorry i can't answer your question, but i have one of my own:

    why on earth would you ever want this to happen?

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Izy

    I guess the way to explain is to start at the end and work backwards. I distribute an mde to four locations (two share areas [one on each of our two main sites] and onto two terminal servers). This mde is linked to a SQL Server or two on our principal site. It is also linked to several MDBs - there are two structurally identical versions of these MDBs at each site, each containing site specific data. Users from one site access their corresponding sites data by default (with an option to rebuild the table links to the other if required). The reason for this is that there are big performance hits for non-terminal server users viewing data across the network. In additoin, I have recently discovered #const and #if..then...else and would be keen to incorporate this into my mde for debugging and yet to be crystallised other purposes.

    So, what does this have to do with programmatic creation of MDEs? Well, the reporting functionality I provide is pretty on demand and there is a culture (which frankly I encourage) of an expectation of quick turn around and accessability of information which means that I am sometimes releasing several versions of the mde in a day. So, the programmatic creation of the mde is that one step standing in between me hitting a button and:
    A copy being made of the database, the table being linked to site1 MDBs, the #const value being changed (I know I will forget to do this manually), MDE being created and copied to site1 share. Process repeated for site2. Process repeated for Terminal Server.
    I am trying to work towards a (admittedly unattainable) working day where all my repetative and mundane tasks are handled by the computer and I can sit back smiling smugly. I know how to do everything else however I see little point in creating my ManagementConsole (I've even named it) if I need to intervene halfway through. I won't consider using SendKeys.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BTW, I am open to suggestions of improvements to the system. I have inherited a front end and distribution system - since it seems to work fine I have never investigated alternatives. Also, it may be relevant to note that the front end is 40MB (despite decompiling and deleting a whole load of objects), which is why it is distributed once by me to several locations rather than several hundred users trying to update their copy from a single location across the cross site link.

    Cheers
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    thinking.........

    i went thru what you said twice and i didn't see an obvious "must distribute .mdb and let them make their own .mde" thing in there.

    i'll go thru a third time over the weekend and see if it talks to me.


    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    I'm trying, honest!

    Aah, no, the users get the mde. They don't make it. I mean I have a single mdb from which I create several mdes. Each of these is subtly different. In addition, there are other changes that I make (e.g. my master MDB file is connected to dummy data so I can play around to test things - before distributing I need to change these links). The premise is - I need to do loads of repetative stuff (relinking tables, parsing the code and changing the #const value, creating the MDE and copying it to four locations). It is boring, time consuming and I make mistakes (rarely, naturally ). I would like to program an Access database to do it all for me. It is the same process everytime; why not? Problem is, I can't get it to do the mde part unless I use RunCommand and I'd rather avoid if I can.

    Thanks for persevering - hope instr worked out!
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hi pf,

    yup - you were right about instr() of course.
    slothy never came back so either it worked for him or he gave up.

    meanwhile - sorry for being dumb: now i see what you are trying to do.
    this is not too far off, but it is A2k3DE

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You star Izy. I'll have a poke around. No need to apologise - I think I am too verbose for my own good most of the time.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  9. #9
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    the blurb in that link states that the tool is distributed with it's own source code...

    ...it would be interesting to see that!

    too bad i don't have a2k3 (de or otherwise)

    izy
    currently using SS 2008R2

  10. #10
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Had a looksey....

    Think you are right, source code could be very interesting. First impressions are- don't think Custom Startup Wizard would be much use as it stands BUT it says I am free to take the source code so that could be incorporated into the MasterConsole (or whatever I called it yesterday).

    Some of the other tools look interesting - ever since I started using Dreamweaver a couple of year ago I have thought that similar project level tools would be incredibly handy for my databases (find orphaned objects, dead links, change links site wide etc.). I suppose you could right a routine to parse the code.... anyway, the Property Scanner Add-In looks along these lines.

    Thanks again Izy - time to raid the Select Disks folder!
    Testimonial:
    pootle flump
    ur codings are working excelent.

  11. #11
    Join Date
    Dec 2001
    Posts
    79
    You can make and .mde file automatically in Access 97 and Access 2000. I don't know of a way to do it in Access 2002, 2003, however.

    'Access 97, 2000 only:
    '* Create .mde file
    Dim appAcc As Access.Application
    Set appAcc = CreateObject("Access.Application")
    appAcc.SysCmd 603, "filename1.mdb", "filename2.mde"
    Set appAcc = Nothing

    Hope this helps,
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

  12. #12
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Cheers Peter - tried it out and it failed - then realised that my home PC uses A02! Will try out ASAP with A2K. First thought, however, is why was this withdrawn from more recent A versions?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  13. #13
    Join Date
    Apr 2004
    Posts
    130

    Some Possible options

    I don't know how to create an mde from code, but would like to know for some of the same reasons as pootle... but again, it isn't that big a deal for me. One suggestion I would make however is that if you set up a simulated server drive on your development box with the same directory structure and drive name as your server environment then you don't have to re-link just before you make the mde. Works fine for me.
    You talk about the "subtle differences" between a number of mde's. Perhaps your effort could be better spent coding an automated routine to change the code or to paramerterize this functionality. I have a fairly complex commercial product which is used in the same version by a number of customers. They have enough business practice differences that it could have warranted different code. I have stayed away from that by paramerterizing much of the system. I manage the differences through the parameters stored on the backend db. If I had different versions of the code my maintenance labor would be much more significant.

    Just my 2 cents. If you find an automated mde creator I'd love to hear about it.

    Winston

  14. #14
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Winston
    Glad to see others people are getting into this thread - I guess what I'm talking about is wider than the limited scope of simply creating an mde.
    I think I understand your first point, but I'm not sure, so I'll have a think about it for now.
    As far as your second point is concerned - agreed. Essentially, my position is that I currently have have three stages under my control (as far as getting a database to users is concerned) - make necessary changes to the databases structure/ code, create MDE(s), copy MDEs across network. I can automate the first part (as you suggest) and the third part, but having to stop and click a few buttons to complete the second part before moving on is a pain.

    In particular, the database quite often checks to see if it is an MDE or an MDB and then adds/ removes functionality based on this. I would far rather this be executed at compile time, but this would require changing the #Const value - something that I would like to automate. I guess this is a simplistic version of your backend paramerterization, however I am really keen on the idea of checking these conditions just the once at compile time. So, what I'm trying to say is that I would like to programatically create an MDE as a compliment to coding an automated routine rather than as a replacement.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  15. #15
    Join Date
    Apr 2004
    Posts
    130
    I understand. Sorry, I don't know how to code the creation of an mde. Again if someone else does, I would like to know. By the way, how do you check if it is an mde vs mdb?
    The first concept I put forth... simulated server drives can also be augmented by using WinXP change drive letter to further sophisticate the simulation. The parameterization is really the right way to go for lazy programmers. I hate coding the same stuff more than once. It pays off in the long run even though it takes more coding upfront. It also adds to your table count significantly.
    Winston

Posting Permissions

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