FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index To do - WishList / Por hacer - Peticiones new ADO functions
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
new ADO functions
Posted: Thu Jul 18, 2013 08:41 AM

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.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 01:10 PM
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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 02:10 PM
Rick,

With MS Access you can 'compact and repair'


How to do it from ADO ? thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 02:20 PM
Antonio,

Antonio Linares wrote:Rick,

With MS Access you can 'compact and repair'


How to do it from ADO ? thanks :-)


Code (fw): Select all Collapse
oJro = CREATEOBJECT( "JRO.JetEngine" )

oJro:CompactDatabase( cConnectionString1, cConnectionString2 )


EMG
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 03:35 PM
Enrico

From my notes I recall the parameters defined as ??

Code (fw): Select all Collapse
cConnectionString1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
cConnectionString2 := "Provider=Microsoft.Jet.OLEDB.4.0;ataSource=MyCompactedDatabase.mdb"



Thanks
Rick Lipkin
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 03:39 PM
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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 03:43 PM
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 (fw): Select all Collapse
cConnectionString1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
cConnectionString2 := "Provider=Microsoft.Jet.OLEDB.4.0;ataSource=MyCompactedDatabase.mdb"
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: new ADO functions
Posted: Thu Jul 18, 2013 06:12 PM

Hello,

Very exciting funcions.

MySQL has the command OPTIMIZE TABLE.

Oracle has it too.

Kind regards

Continue the discussion