Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

acCmdMakeMDEFile

Status
Not open for further replies.

markphsd

Programmer
Jun 24, 2002
758
0
0
US
Does anyone have experience with this runcommand?

With some of my databases it works, and with others it doesn't. I don't know why.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
I have never used that cmd but if it works on some of your db's and not others it sounds like a reference problem check your reference on both types of db's

Hope this helps
Hymn
 
Well, i can compile and make mde's out of the db's manually. But when i try to use acCmdMakeMDEFile one of them fails. My references are fine, I know that for sure.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Nevermind, I got the syscmd 603 function working. It's way better because it avoids the send keys and you can output to a named file with a mdb extenstion. This puts me much closer to a one setup distribution.

Public Function fnGenerateMDE(strDBFile As String, strMDEFile As String)
Dim appAccess As Access.Application

Set appAccess = New Access.Application
appAccess.Visible = True
appAccess.SysCmd 603, strDBFile, strMDEFile

appAccess.Quit acQuitSaveNone

Set appAccess = Nothing
End Function

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Sorry for the partial post above. Re the highlighed element of the quote, HOW (and where) did you find / get the intrinsic constant value to enter here? It does not appear in my help system and is not a memeber of the collection of the referenced constants in the Object Browser.

Further, while the help notes that Arg3 (strMDEFile) is a variant, it also notes that it must be a numeric value

Help said:
" Argument3 Optional Variant. A [highlight]numeric expression[/highlight] that controls the display of the progress meter. This argument is required when the action argument is acSysCmdInitMeter; this argument isn't valid for other action argument values. "

while you are obviously (?) supplying a standard string?

Where have I gone awry?





MichaelRed


 
Just to anyone reading this post: acCmdMakeMDEFile is a terrible solution. I wouldn't ever use it.

Hey Michael,

I've been reading your posts for about two years, ever since I started programming. I'm suprised that I know something you didn't. But there's a lot to programming I guess.

603 is undocumented, but has been known for a couple of years. FMS was credited with posting it as a solution. Is all over the internet. There are a few other undocumented syscmds apparently. I should have links to my searches if you want them.

Have you tried 603 out, did it work for you? It hasn't failed yet. The only thing to note is that you have to have .mdw permissions to generate an mde that does uses the default system.mdw

I've been reading about tests for software companies, and their productivity. One of the things was a single step distribution.

I'm reposting this question in the forum, but I'm looking for a decomile command other then the switch used to open Access. Are you aware of one?

So far with my single step solution I have:
decompile
compress
compile
compress
makemde
Disable Shift Keys.
copy to a zip
Copy to an executable zip.

(Next step)
ftp to website.

I would like to copy all the code for a package and distribution wizard and then use this for new installations.

My distribution includes like 4 mde's (with mdb for the extetions). and about 4 other mdbs for databases. And about 30 files overall. I had to do all this stuff just get the updates ready.. renaming files. copying them... This method has already decresed errors in my updates and the time it takes to prepare an update, 2 hours of careful making of mistakes to 4 minutes of waiting for the code to run. I'm really excited about it. I might post a lot of it up here in the FAQ's.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Mark,

Thanks for your response. I have not been actively employed for a while (except for brief 'fire fights') and have never been a wide area browser of VB(A) or even general programming. I have generally avoided 'undocumented' aspects of Ms. software, as they have a tendancy to change. Although there are MANY such features, the simple fact that they are not documented (by Ms.) implies this chemeleon like characteristic, and has actually been used by Ms. as a reason for the rationale for the lack of documentedness.

I am not aware of alternatives to the decompile switch option.




MichaelRed


 
Unemployeed?

Looking for some work? I need sales reps, or referal sources. But I shouldn't post that here.

Yeah, I've read about the pitfalls of undocumented features. But, the documented method has worse pitfalls.

See you around.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Michael,

This is straight out of the Packagewizard 2003
'----------------------------------------------------------------------
' MakeMDE
'
' Makes an MDE/ADE file.
' Returns True if it was successfully created.
'----------------------------------------------------------------------
Function MakeMDE(SourceFile As String, DestinationFile As String, Optional AcApp As Application) As Boolean
If AcApp Is Nothing Then Set AcApp = Application ' Use the current application if one was not specified
If gFSO.FileExists(DestinationFile) Then ' If the destination already exists
Debug.Assert False ' Don't do anything
Else ' Otherwise
AcApp.SysCmd 603, SourceFile, DestinationFile ' Call the magic SysCmd
MakeMDE = gFSO.FileExists(DestinationFile) ' Return True if the file now exists
End If
End Function

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Interesting. I am aware that there are (numerous) examples of Ms. using undocumented 'features'. Why would they even exist if they were not needed (used) by someone at some time? On the other hand, I have personally met with some grief using them. In my case, it was probably foolish as I failed to thoroughly test a set of routines I had developed. The development was done in one org, to provide 'documentation' (a traditional "CREF" File. I moved to another org after the first went belly up, and attempted to use it to get a handle on the several dbs I was assigned to maintain. I DID get results, and only figured out they were somewhat askew after some (new) co-workers asked about the 'tool' set and tried it out on their projects. ... ... Egg ... ... Face ... ... mine ...


The 2nd org was using a newer version of Ms. A. I did read the update documentation and sucessfully caught MOST of the changes noted therein. Unfortunatly, Ms. Doesn't seem to include change to Undocumented features. functions, structures, parameters, etc. in these briefings.

I've been gun-shy ever since.


P.S. the routine (as posted alone) needs to have a declaration of the File System Object. I'm sure that the module it comes from has that at the module level.





MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top