Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBCMD/1011 Alias in Use

Status
Not open for further replies.

Rahja

Programmer
Mar 4, 2007
16
CA
I am trying to run to my Clipper 5.01 code using Clipper 5.3 and Blinker 1.0. I am getting the above mentioned error code when I try to open up a dbf in a second work area. This works very well in 5.01 but I cannot get it to work now. Does anyone know what I am doing wrong? Do I need to use any particular switches when compiling?

Any direction will be greatly appreciated!

Thanks.......... Brian
 
If you are trying to open the same database is another workarea, you need to add the ALIAS <aliasname> clause to your USE statement, supplying a unique alias for every workarea.

HTH
TonHu
 
Brian,

TonHu is correct, your program is trying to open a dbf file that is already open in another part of your program. Does your program open all of the needed dbf files at start up or does it open and close them as needed. If they are always open then just point to the select area and you should be OK. But if you are opening and closing them then this dbf isn't getting closed after it is used.

Jim C.
 
No, my program opens the files only when required and then closes when the task is complete. What puzzles me is this works fine under Clipper 5.01 with RtLink, but will not work under 5.3 with Blinker.
 
You may be opening files with the same name, but in other subdirs, these get the name of the file as an Alias, and not parts of the path. Can't recall if 5.01 allowed duplicate aliasses, but that can also be the source of this problem.

HTH
TonHu
 
Older versions of clipper used to default the alias of the file being used to the area letter in which the file was opened, so you would refer to the database fields using the area letter as the alias (i.e. A->fieldname).

Newer versions default to the database name as the alias when none is specified. The database name does not include the path. Therefore if you need to open the same file in two areas or two different files with the same name then you must specify unique aliases.

If you are working with legacy code and don't want to have to chase down a ton of field references to change tha aliases, then just make each file alias the workarea letter in which it is opened and everything else remains the same.

I doubt the linker is causing this; possibly you were using 5.2 libs in the past? I know 5.2 aliased the old way, but I no longer have 5.3 to see if that is when this behavior changed.

Jock

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top