Okay, I am using Advantage Data Server 11.10.0.10 on Windows 7 with stADS_LOCAL and nothing but native tables of type ttAdsADT.

In the C++Builder XE4 project I am working on, everything was going fine until I got the bright idea of using a TAdsConnection component with an assigned Alias ('AliasName') instead of assigning the value of 'DatabaseName' directly.

I wanted to do this partly so I could have two versions of the data tables, one that is for development and testing only and the other, for actual data I am working on with the application in question. This way, I thought, I could simply change the Alias name in the TAdsConnection component, rebuild the application and change whether or not I was accessing the actual or the development data tables.

So I copied all the data tables to another drive and folder for the actual version of the tables and went into Advantage Data Architect and created a new Alias and pointed that alias to that other drive and folder where the actual version of the tables reside.

I tested opening the tables, and the Architect opened them just fine.

When I then went into my project to change the value of 'AliasName' in the TAdsConnection component to the new Alias, it was not listed in the dropdown. I typed it in anyway. When I built and ran the application, I got an immediate exception and was told the application could not find the first table it tried to access because the DatabaseName was not assigned.

So ... thinking it was my problem, I studied things for quite a while. But then I discovered that I could not even assign the new drive and folder to the pre-existing Alias ... at least not and get it to work in the application. It worked fine in the Architect, but when I ran the application, it threw an exception and said it could not find the table in the old, previous path, i.e., the path that the Alias was no longer assigned to!

I have now tried various things. And I have stopped and restarted the server several times, and cold booted about 3 times and have even reinstalled the server. I have made sure the Architect is not connected when I build and run the application. Etc. I still cannot get the new Alias I created to show up in the dropdown list in the Object Inspector for the TAdsConnection component, and I still cannot get the server to recognize that I have changed the drive and folder the old Alias points to. And each and every time I try to run my application, the very best behavior I can get out of the server without setting the original Alias right back to the original drive and folder it originally pointed to) is that it keeps looking in the old path for the tables, i.e., the path that the Alias in question is no longer assigned to.

So ... apparently, I cannot create any new Aliases in the Architect that will work outside of the Architect, and I cannot change the definition of any pre-existing Alias so that it will work outside of the Architect.

What the heck is this? Am I doing something wrong?

Please help.

asked 19 Sep '13, 10:52

BigDawg's gravatar image

BigDawg
26336
accept rate: 0%


It sounds like you may be using two (or more) different instances of the ADS.INI file. I'd suggest using a utility such as procexp to determine what ADS.INI file is loaded by ARC, C++Builder, and your application. If you start procexp, then also ARC and C++Builder, you should be able to compare the files that they have loaded. And, if they are using files in different locations, you may need to move/replace the version that your application or C++Builder is using with the version that ARC is using.

You can obtain Process Explorer here. I hope this helps you get to the bottom of this.

link

answered 19 Sep '13, 11:02

Jed%20Thomet's gravatar image

Jed Thomet
2.7k12648
accept rate: 38%

Thanks. I just figured out that that is probably what is going on. I thought the ads.ini file had to be in the same folder as the application's executable to affect anything, but apparently not. I certainly could not find one in there ... but I will definitely keep looking.

Thanks again.

link

answered 19 Sep '13, 13:41

BigDawg's gravatar image

BigDawg
26336
accept rate: 0%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×14

Asked: 19 Sep '13, 10:52

Seen: 2,446 times

Last updated: 19 Sep '13, 13:41

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.