new ADO functions

Post Reply
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

new ADO functions

Post 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.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: new ADO functions

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: new ADO functions

Post by Antonio Linares »

Rick,
With MS Access you can 'compact and repair'
How to do it from ADO ? thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: new ADO functions

Post 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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: new ADO functions

Post 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
Last edited by Rick Lipkin on Thu Jul 18, 2013 3:40 pm, edited 1 time in total.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: new ADO functions

Post 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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: new ADO functions

Post 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"
 
elvira
Posts: 462
Joined: Fri Jun 29, 2012 12:49 pm

Re: new ADO functions

Post by elvira »

Hello,

Very exciting funcions.

MySQL has the command OPTIMIZE TABLE.

Oracle has it too.

Kind regards
Post Reply