TsiCompact can't read password

Matthew Snook

NW Salmon Database
Local time
Today, 16:02
Joined
Apr 19, 2001
Messages
133
If anybody has used the TsiCompact utility from http://www.trigeminal.com perhaps you can help. The following code correctly runs the CompactMyDatabase function from a class module if I'm compacting a database with no security setup:

Public Sub CompactMyDatabase(Source As String, Destination As String)
Set m_jet = New TsiCompact.Jet
m_jet.CompactDatabase Source, Destination
End Sub

Now if I include the properties to compact a secured database:

Public Sub CompactMyDatabase(Source As String, Destination As String)
Set m_jet = New TsiCompact.Jet
m_jet.UserName = "myname"
m_jet.Password = "mmm"
m_jet.SystemDB = "C:\CBSDataBase\CBSSecurity.mdw"
m_jet.CompactDatabase Source, Destination
End Sub

all is not well. As I step down through the process, setting the UserName and SystemDB works well, they are reported as having the values designated. But Password stays blank for some reason, and the m_jet.Password="mmm" statement has no effect on the property. Plus, when I allow the process to continue there are no further steps taken! If I put breakpoints at the BeginCompact, CompactFail, EndCompact subroutines there is no response. The process simply quits after I designate the three properties.

Has anybody seen this before?

Thanks,

Matt


(And thanks to M. Kaplan for making this stuff available. The TSI utilities are great!)
 
Have you tried the following

m_jet.CompactDatabase Source, Destination, dbLangGeneral & ";pwd=mmm", , ";pwd=mmm"

hth

John
 
Will that work with this TsiCompact.dll? The prompt while in the IDE lists only Source and Destination. The rest pop up as properties when you put the "." after m_jet.

Matt
 
I'm not sure, you'll have to try it. I can tell you that it works from my maintenance program to the program of my choosing like this.
DBEngine.CompactDatabase Source, Destination, dbLangGeneral & ";pwd=mmm", , ";pwd=mmm"
 

Users who are viewing this thread

Back
Top Bottom