ADOX and data migration

Howdy guys,

I had the same problem since many years; I want to be able to manage the 
  structure of an Access database at run time. In practice I have 
installation of a small project, and I would like to have the 
application sense that it lacks a field (done), and then being able to 
add it (not done).

The options I had suggested to me so far are

1) a migrationtool made in Access (which is said to be possible to 
compile into a stand-alone executable) - I generally disfavour this, if 
for no other reason then as I don't code VBA.

2) have the datafile sent to me - would work but side effects include 
that a freeze is needed while I work on the file, and for privacy 
reasons the users may not want to share their data.

3) Buy an external component that does this. (eg: 
http://www.winsoft.sk/adoxcs.htm). In general I am a bit sceptical to 
the concept of buying components. If they can do it, so could I ;-)

4) A migration tool in the same EXE. - My favourite, if i just knew how 
to. I know ADOX can do this, but so far I have seen no tutorial that 
would help me to import the ADOX library into Delphi 2007 or now Delphi 
2009. (I'm very new to importing type libraries so it would have to be 
fairly detailed).

Is there a tutorial that would describe this? The existing ones aren't 
compatible with Delphi 2007/2009 and as you need to rename a few items 
in the file, which I don't know how to in D2007 and Delphi 2009.

/Pontus "Bacchus" Berg
0
Pontus
9/26/2008 6:10:50 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

3 Replies
508 Views

Similar Articles

[PageSpeed] 35

> {quote:title=Pontus Berg wrote:}{quote}
> Howdy guys,
> 
> I had the same problem since many years; I want to be able to manage the 
>   structure of an Access database at run time. In practice I have 
> installation of a small project, and I would like to have the 
> application sense that it lacks a field (done), and then being able to 
> add it (not done).
> 
> The options I had suggested to me so far are
> 
> 1) a migrationtool made in Access (which is said to be possible to 
> compile into a stand-alone executable) - I generally disfavour this, if 
> for no other reason then as I don't code VBA.
> 
> 2) have the datafile sent to me - would work but side effects include 
> that a freeze is needed while I work on the file, and for privacy 
> reasons the users may not want to share their data.
> 
> 3) Buy an external component that does this. (eg: 
> http://www.winsoft.sk/adoxcs.htm). In general I am a bit sceptical to 
> the concept of buying components. If they can do it, so could I ;-)
> 
> 4) A migration tool in the same EXE. - My favourite, if i just knew how 
> to. I know ADOX can do this, but so far I have seen no tutorial that 
> would help me to import the ADOX library into Delphi 2007 or now Delphi 
> 2009. (I'm very new to importing type libraries so it would have to be 
> fairly detailed).
> 
> Is there a tutorial that would describe this? The existing ones aren't 
> compatible with Delphi 2007/2009 and as you need to rename a few items 
> in the file, which I don't know how to in D2007 and Delphi 2009.

Go to this URL
http://delphi.about.com/od/database/l/aa072401a.htm
Where it says
Select Project | Import Type Library
for D2007 change that to 
Component|import Component| Import a type library
choose the version of ADOX you want to import
click through the next buttons until you have the option to Create a Unit and Finish
Now edit the unit created to make the changes the above URL gives you.

However Jet SQL DDL is now quite capable and you should be able to make the chages to you tables you are looking for with SQL which is much simpler to program.
0
Brian
9/27/2008 1:19:41 AM
Brian Bushay skrev:

>> 4) A migration tool in the same EXE. - My favourite, if i just knew how 
>> to. I know ADOX can do this, but so far I have seen no tutorial that 
>> would help me to import the ADOX library into Delphi 2007 or now Delphi 
>> 2009. (I'm very new to importing type libraries so it would have to be 
>> fairly detailed).
>>
>> Is there a tutorial that would describe this? The existing ones aren't 
>> compatible with Delphi 2007/2009 and as you need to rename a few items 
>> in the file, which I don't know how to in D2007 and Delphi 2009.

> Go to this URL
> http://delphi.about.com/od/database/l/aa072401a.htm
> Where it says
> Select Project | Import Type Library
> for D2007 change that to 
> Component|import Component| Import a type library
> choose the version of ADOX you want to import
> click through the next buttons until you have the option to Create a Unit and Finish
> Now edit the unit created to make the changes the above URL gives you.
> 
> However Jet SQL DDL is now quite capable and you should be able to make the changes to you tables you are looking for with SQL which is much simpler to program.

This process gives me a file named ADOX_TLB.pas under "Imports". It 
doesn't contain any TTable, TColumn and so on! Perfming the action, I 
get several errors as well in the header of the file:

// Type Lib: C:\Program Files\Common Files\System\ado\msadox.dll (1)
// LIBID: {00000600-0000-0010-8000-00AA006D2EA4}
// LCID: 0
// Helpfile: C:\Program Files\Common Files\System\ado\ado270.chm
// HelpString: Microsoft ADO Ext. 2.8 for DDL and Security
// DepndLst:
//   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// Errors:
//   Hint: TypeInfo 'Property' changed to 'Property_'
//   Hint: TypeInfo 'Procedure' changed to 'Procedure_'
//   Hint: Parameter 'Object' of _DynaCollection.Append changed to 'Object_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Hint: Parameter 'Type' of Columns.Append changed to 'Type_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Hint: Parameter 'Type' of Keys.Append changed to 'Type_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Hint: Symbol 'Type' renamed to 'type_'
//   Error creating palette bitmap of (TTable) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TColumn) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TIndex) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TKey) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TGroup) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TUser) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons
//   Error creating palette bitmap of (TCatalog) : Server C:\Program 
Files\Common Files\System\ado\msadox.dll contains no icons


Also; looking at the source it looks like the imported did a rename. 
Please see this extract. It says TADOIndex as ClassName:

*********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TIndex
// Help String      :
// Default Interface: _Index
// Def. Intf. DISP? : No
// Event   Interface:
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
   TIndexProperties= class;
{$ENDIF}
   TADOXIndex = class(TOleServer)
   private
     FIntf: _Index;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
     FProps: TIndexProperties;
     function GetServerProperties: TIndexProperties;
{$ENDIF}

(Noob warning) Next thing is how I use this - do I just add the pas file 
to my project or what?

/Pontus

PS: Added the pas file to the post, but I am uncertain if attachments 
pass through ...
0
Pontus
9/27/2008 12:36:29 PM
> {quote:title=Pontus Berg wrote:}{quote}
> Brian Bushay skrev:
> 
> >> 4) A migration tool in the same EXE. - My favourite, if i just knew how 
> >> to. I know ADOX can do this, but so far I have seen no tutorial that 
> >> would help me to import the ADOX library into Delphi 2007 or now Delphi 
> >> 2009. (I'm very new to importing type libraries so it would have to be 
> >> fairly detailed).
> >>
> >> Is there a tutorial that would describe this? The existing ones aren't 
> >> compatible with Delphi 2007/2009 and as you need to rename a few items 
> >> in the file, which I don't know how to in D2007 and Delphi 2009.
> 
> > Go to this URL
> > http://delphi.about.com/od/database/l/aa072401a.htm
> > Where it says
> > Select Project | Import Type Library
> > for D2007 change that to 
> > Component|import Component| Import a type library
> > choose the version of ADOX you want to import
> > click through the next buttons until you have the option to Create a Unit and Finish
> > Now edit the unit created to make the changes the above URL gives you.
> > 
> > However Jet SQL DDL is now quite capable and you should be able to make the changes to you tables you are looking for with SQL which is much simpler to program.
> 
> This process gives me a file named ADOX_TLB.pas under "Imports". It 
> doesn't contain any TTable, TColumn and so on! Perfming the action, I 
> get several errors as well in the header of the file:
> 
> // Type Lib: C:\Program Files\Common Files\System\ado\msadox.dll (1)
> // LIBID: {00000600-0000-0010-8000-00AA006D2EA4}
> // LCID: 0
> // Helpfile: C:\Program Files\Common Files\System\ado\ado270.chm
> // HelpString: Microsoft ADO Ext. 2.8 for DDL and Security
> // DepndLst:
> //   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
> // Errors:
> //   Hint: TypeInfo 'Property' changed to 'Property_'
> //   Hint: TypeInfo 'Procedure' changed to 'Procedure_'
> //   Hint: Parameter 'Object' of _DynaCollection.Append changed to 'Object_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Hint: Parameter 'Type' of Columns.Append changed to 'Type_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Hint: Parameter 'Type' of Keys.Append changed to 'Type_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Hint: Symbol 'Type' renamed to 'type_'
> //   Error creating palette bitmap of (TTable) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TColumn) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TIndex) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TKey) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TGroup) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TUser) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> //   Error creating palette bitmap of (TCatalog) : Server C:\Program 
> Files\Common Files\System\ado\msadox.dll contains no icons
> 
> 
> Also; looking at the source it looks like the imported did a rename. 
> Please see this extract. It says TADOIndex as ClassName:
> 
> *********************************************************************//
> // OLE Server Proxy class declaration
> // Server Object    : TIndex
> // Help String      :
> // Default Interface: _Index
> // Def. Intf. DISP? : No
> // Event   Interface:
> // TypeFlags        : (2) CanCreate
> // *********************************************************************//
> {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
>    TIndexProperties= class;
> {$ENDIF}
>    TADOXIndex = class(TOleServer)
>    private
>      FIntf: _Index;
> {$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
>      FProps: TIndexProperties;
>      function GetServerProperties: TIndexProperties;
> {$ENDIF}
> 
> (Noob warning) Next thing is how I use this - do I just add the pas file 
> to my project or what?
> 
> /Pontus
> 
> PS: Added the pas file to the post, but I am uncertain if attachments 
> pass through ...

If you have tTable in the error messages I find it hard to believe that it is not a class in your Adox_tlb.pas file.

Don't wory about the errors the only refer to no Icons which is to be expected.
All you need to do to use this ADOX_tlb.pas file is to include it in your application.
Then you can use the functions and procedures defined for the Classes in your file.
0
Brian
9/29/2008 1:41:37 AM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

data, data, data
Hello, I need some advice on the best method to keep a database updated in this scenario. I have a local Solomon SQL Server where we keep our inventory. I want to build an application that will be hosted at a remote hosting location which provides a SQL database. I want to build the application to allow clients to access the inventory items and make requests based on the remote SQL data. The order will be sent to our fulfillment department via email; they will fiill the request and ship.  I'm not sure the method to do this while keeping the data current on the remote and the l...

Oracle NCLOB data getting truncated when using delphi ADO
I am using Delphi2007 and using ADO for data access. When trying to select nclob data from an Oracle database it generally works, but I have one query that is consitantly truncating the data at 12 characters. I have already been in touch with Oracle and they have confirmed that the OLEDB provider that is being used is correctly returning the data. Here is the query select ACT_KEY, COALESCE((SELECT LTX_TEXT FROM TEXT_TABLE WHERE LTX_TABLE='SOURCE_TABLE' AND LTX_TEXT_ID = 'ACT_DESC' AND LTX_TABLE_KEY = CAST(SOURCE_TABLE.ACT_KEY AS NVARCHAR2(10))),TO_NCLOB(ACT_DESC)) as A...

Migration from Delphi 5 to Delphi 2005
Hi, Currently we are using Delphi 5 in that we have lot of source file now we planned to migrate from Delphi 5 to Delphi 2005. My question is - 1. Is it possible to migrate directly from Delphi 5 to Delphi 2005, my old code was developed using Delphi 5 IDE. Can we able to compile and build without any issue in Delphi 2005? 2. If we can able to do then what are the ways to migrate to Delphi 2005 IDE and also provide some link regarding this migrate? Thanks, Rizwan Rizwan Ahmed schrieb: > Hi, Currently we are using Delphi 5 in that we have lot of source > f...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

Migrate from Delphi 2007 to Delphi 2010
Hi All, Thanks in advance for your help. Below is my query, Currently I am using Delphi 2007 and i want to migrate to Delphi 2010. 1. What all things i need to take care while doing this? 2. What all third party components will get impacted? 3. Any known issues in Delphi 2010 which might impact the cause? 4. Any changes in database operation required as i am using Oracle? Hope I have post this query under correct category. If not sorry for the trouble and could you please suggest me the correct category for this? Looking forward for your response. Have a great day. Th...

Migrating from Delphi 7 to Delphi XE3
Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. I was wondering if there is a good book or reference to learn all new things XE3 added. Any suggestions? On 5/3/2013 10:17 PM, George Karatsiolis wrote: > Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. > I was wondering if there is a good book or reference to learn all new things XE3 added. Try this one for starters: http://tinyurl.com/cgsu243 Aside from that you really need to evaluate your application. XE3 is Unicode for example.... So her...

Migrating to Delphi XE from Delphi 7.0
Below is my code in Delphi 7.0, this is how to call another units in webmodule... Hello All, I create a web application in Delphi 7.0, using the Web Server Application, CGI, IntraWeb 7.0.15. And I used TIWPageProducer to view like this url "http://localhost/mcr/mcr.exe/main". I built and run. I viewed in thru IIS and it is running... This is my code in Delphi 7.0 .... .... procedure TWebModule1.proMainGetForm(ASender: TIWPageProducer; AWebApplication: TIWApplication; var VForm: TIWPageForm); begin VForm := TfrmMain.Create(AWebApplication); end;...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

Dynamic Data And Ado.Net Data Service
Hi,I'm wondering if it is possible to mix up Dynamic Data and Ado.Net Data Service.I have found no information on google yet.Thanks for your replies, Hasan Yes you will be able to have a look at the Preview on Codeplext here the new Domain Service will allow this sort of thing see David Ebbo's and Nukhil Kothari's sessions at mix09 Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms .NET RIA Services - Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NETSteve Seeking the elegant solution.[Oh! If olny I colud tpye!]c# Bits...

Dynamic Data with ADO.NET Data Services
Is it currently possible to use Dynamic Data with ADO.NET Data Services? I've had a play with this to see if this would work but I didnt have much luck. I ran the datasvcutil.exe against my service (which is a  ADO.NET Data Services on a LINQ to SQL model) but I ended up with a "The context type 'Entities.NorthwindDataContext' is not supported" message.  It seems to make sense that these technologies would work together...is there something else I am missing? Perhaps this functionality isn't supported yet? Thanks, Craig Hi Cr...

Migrating to Delphi XE from Delphi 7.0
Below is my code in Delphi 7.0, this is how to call another units in webmodule... Hello All, I create a web application in Delphi 7.0, using the Web Server Application, CGI, IntraWeb 7.0.15. And I used TIWPageProducer to view like this url "http://localhost/mcr/mcr.exe/main". I built and run. I viewed in thru IIS and it is running... This is my code in Delphi 7.0 .... .... procedure TWebModule1.proMainGetForm(ASender: TIWPageProducer; AWebApplication: TIWApplication; var VForm: TIWPageForm); begin VForm := TfrmMain.Create(AWebApplication); end; procedure TWebModule1....

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

Dynamic Data over ADO.NET Data Service
I would like to create a dynamic data web site that does not have a database connection to the underlying database, but instead accesses the data through an ADO.NET data service.  Is this possible?  Thanks,Dennis If you look at the Dynamic Data Futures solution on CodePlex, it has an early version of something that does that.  Also, see this thread. thanks,David David,  That's exactly what I was looking for.  However, I am running into a problem when I try to develop my own dynamic data client site.  I created a dynamic data web site, added a referenc...

Web resources about - ADOX and data migration - embarcadero.delphi.ado

Migration - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Paris deal considers climate change role in mass migration
Global warming has already contributed to the the large-scale displacement of people that has been an ominous, politically sensitive undercurrent ...

EU-Turkey summit to center on stemming migration flow
EU-Turkey summit to center on stemming migration flow

Security is a major concern for cloud migrations
... Moreover, 40 percent worry about the loss of physical control over data in the cloud. In particular, 69 percent of companies fear migration ...

Migration to Windows 10 to be fastest yet, says Gartner
Windows 10 is poised to become the most widely installed version of Windows ever, following on the path of Windows XP and Windows 7 before it, ...

IBM Nabs Giant Eagle Cloud Migration Deal
IBM can now count Giant Eagle among its growing list of cloud customers, as Big Blue works to overhaul the supermarket chain's IT operations. ...

High skilled migration and global innovation
... using a multi-country endogenous growth model. The proposed framework introduces and quantifies a “frontier growth effect” of skilled migration: ...

Site Redesign & Migration Tips To Avoid SEO & UX Disasters
Planning to overhaul your website? Check out contributor Modestos Siotos' tips to help you minimize the potential negative impact of a site relaunch. ...

Mass Migration of Muslims to U.S. Mostly a Mirage
Contrary to Donald Trump's claims, immigrants from Muslims countries constitute a paltry percentage of the total number coming into the U.S. ...

6 ways to cut the cost and pain of a Windows 10 migration
... past two years, the cost and frustration was not only high, the resources required were crippling. But ready or not, chances are a new migration ...

Resources last updated: 12/14/2015 2:38:09 AM