new ADO functions

new ADO functions

Postby lucasdebeltran » Thu Jul 18, 2013 8: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: new ADO functions

Postby Rick Lipkin » Thu Jul 18, 2013 1: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: new ADO functions

Postby Antonio Linares » Thu Jul 18, 2013 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: new ADO functions

Postby Enrico Maria Giordano » Thu Jul 18, 2013 2:20 pm

Antonio,

Antonio Linares wrote:Rick,

With MS Access you can 'compact and repair'


How to do it from ADO ? thanks :-)


Code: Select all  Expand view  RUN
oJro = CREATEOBJECT( "JRO.JetEngine" )

oJro:CompactDatabase( cConnectionString1, cConnectionString2 )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: new ADO functions

Postby Rick Lipkin » Thu Jul 18, 2013 3:35 pm

Enrico

From my notes I recall the parameters defined as ??

Code: Select all  Expand view  RUN

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

Re: new ADO functions

Postby Enrico Maria Giordano » Thu Jul 18, 2013 3: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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: new ADO functions

Postby Rick Lipkin » Thu Jul 18, 2013 3: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: Select all  Expand view  RUN

cConnectionString1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
cConnectionString2 := "Provider=Microsoft.Jet.OLEDB.4.0;ataSource=MyCompactedDatabase.mdb"
 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: new ADO functions

Postby elvira » Thu Jul 18, 2013 6:12 pm

Hello,

Very exciting funcions.

MySQL has the command OPTIMIZE TABLE.

Oracle has it too.

Kind regards
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm


Return to To do - WishList / Por hacer - Peticiones

Who is online

Users browsing this forum: No registered users and 1 guest