Page 1 of 1

new ADO functions

Posted: Thu Jul 18, 2013 8:41 am
by lucasdebeltran
Hello,

Continuing with great and very usefull ADO functions created by Mr. Nages, it would be very interesting to have also the following:

- Optimice table.
- Backup table.


Thank you very much.

Re: new ADO functions

Posted: Thu Jul 18, 2013 1:10 pm
by Rick Lipkin
Lucas
- Optimice table.
- Backup table.
Both of your requests are have different answers depending on your Database. With MS Access you can 'compact and repair' as well as just copying the .mdb or .accDb using code .. however, Sql Server and Oracle are not that simple and require a Data Base Administrator to perform those tasks.

RIck Lipkin

Re: new ADO functions

Posted: Thu Jul 18, 2013 2:10 pm
by Antonio Linares
Rick,
With MS Access you can 'compact and repair'
How to do it from ADO ? thanks :-)

Re: new ADO functions

Posted: Thu Jul 18, 2013 2:20 pm
by Enrico Maria Giordano
Antonio,
Antonio Linares wrote:Rick,
With MS Access you can 'compact and repair'
How to do it from ADO ? thanks :-)

Code: Select all

oJro = CREATEOBJECT( "JRO.JetEngine" )

oJro:CompactDatabase( cConnectionString1, cConnectionString2 )
EMG

Re: new ADO functions

Posted: Thu Jul 18, 2013 3:35 pm
by Rick Lipkin
Enrico

From my notes I recall the parameters defined as ??

Code: Select all

cConnectionString1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
cConnectionString2 := "Provider=Microsoft.Jet.OLEDB.4.0;ataSource=MyCompactedDatabase.mdb"
 

Thanks
Rick Lipkin

Re: new ADO functions

Posted: Thu Jul 18, 2013 3:39 pm
by Enrico Maria Giordano
Rick,
Rick Lipkin wrote:Enrico

cConnectionString1 is the path and name of the current .mdb ?
cConnectionString2 is the path and name of the new ( repaired ) .mdb ?

Thanks
Rick Lipkin
cConnectionString1 is the ConnectionString of the current .mdb
cConnectionString2 is the ConnectionString of the new ( repaired ) .mdb

:-)

EMG

Re: new ADO functions

Posted: Thu Jul 18, 2013 3:43 pm
by Rick Lipkin
Enrico

Thanks .. I went back and edited my post from my notes as you described it to me recently. I have not had a chance to try it yet :(

Rick Lipkin

Code: Select all

cConnectionString1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
cConnectionString2 := "Provider=Microsoft.Jet.OLEDB.4.0;ataSource=MyCompactedDatabase.mdb"
 

Re: new ADO functions

Posted: Thu Jul 18, 2013 6:12 pm
by elvira
Hello,

Very exciting funcions.

MySQL has the command OPTIMIZE TABLE.

Oracle has it too.

Kind regards