Re: ADOX - Import type library into Delphi 2007
- From: Pontus Berg <pontus@xxxxxxxxxxxxxxxxx>
- Date: Mon, 19 May 2008 23:31:25 +0200
Howdy!
There has been talks about this before on this topic, but I want to do something which I think Delphi is reluctant to help me with.
I am comparing the structure in the program file and the structure actually found in the MDB file, which Delphi basically tells me not to do.
//Contains what I have in the DB file...
ADOConnection1.GetFieldNames('Progress', FieldsOnDiskList.Items);
//Contains what I want to have! - Defined by the DefFields
ADO_Progress.GetFieldNames(FieldsInClientList.Items);
I get this message (pointing at the second line above):
[DCC Warning] main.pas(882): W1000 Symbol 'GetFieldNames' is deprecated
It does however work and I do detect the differences between the two, so all I then plan to do is adapt the structure on the disk file (adding missing fields in a post). Without ADOX I can't do that!
What I would like to do is update the MDB automatically when the first user runs the new EXE.
I would strongly appreciate any guiding findings from you!
/Pontus
ps: I had to go D2007 to be able to produce a vista compatible version of my program. Something in the old one made it fail working. I don't know if this is a general problem, or personally aimed at myself ;-)
mIKE skrev:
I am anticipating moving as many Delphi 5 apps as possible to D2007 starting soon, and since most of what I do is ADO with SQL-Server and Access MDB on the back end, I will need to know the answer to your question too. If I discover anything, I will let you know. I will also be trying to determine if ADO/ADOX have become superfluous in D2007 Enterprise due to some other available technology. (I think I only use ADOX in one utility program that I use to print table structures.).
In the interim, I looked at the article in that link, and I find that it is slightly different from what worked for me. The article calls for renaming two items that for some reason I found I could not rename without creating some kind of problem. Specifically, I found that I had to leave TKey and TCatalog with their original name.
mIKE
"Pontus Berg" <pontus@xxxxxxxxxxxxxxxxx> wrote in message news:482b581d@xxxxxxxxxxxxxxxxxxxxxxxxxHowdy!
I asked the same question more than two years ago, and give it a new shot here as I still have got no answers I have been able to use.
I want to modify an Access database at runtime and this takes ADOX (not only ADO but also ADOX so you can f.ex. access the structure of the data and not only the data itself).
Importing a type library is very well described at many informative sites. Take this brilliant example:
http://delphi.about.com/od/database/l/aa072401a.htm
Now; How do I do that in Delphi 2007? It's totally different and renaming is not one of the options.
/Pontus Berg
- References:
- ADOX - Import type library into Delphi 2007
- From: Pontus Berg
- Re: ADOX - Import type library into Delphi 2007
- From: mIKE
- ADOX - Import type library into Delphi 2007
- Prev by Date: Re: Append and post - with standardvalues
- Next by Date: Re: ADOX - Import type library into Delphi 2007
- Previous by thread: Re: ADOX - Import type library into Delphi 2007
- Next by thread: Re: ADOX - Import type library into Delphi 2007
- Index(es):
Relevant Pages
|