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!

AddAlias Fails Again!!!

Status
Not open for further replies.

Rick4077

Technical User
Oct 19, 2004
149
US
I don't get it. Looks just like a sample in the Paradox Manual.
Code:
method pushButton(var eventInfo Event)
var;----------------Declare Variables-------------
Mrmls                table
MrmlsNormalized		table
qbe						query
endVar;-------------End Variable List-------------
addAlias("MyDir","Standard","D:\\Pdoxwin\\Mrmls")
;----------------------------------------------------------------

qbe=Query

:Mrmls:MrmlsNormalized.db | OfficeID | NormalizedOfficeName |
                          | _ID      | _Name |

:Mrmls:Mrmls.db  			  | ListId   | ListName |
                 			  | _ID      | changeto _Name |

endquery
	if not qbe.executeQbe()then
errorShow()
	return
	endif

qbe=Query

:Mrmls:MrmlsNormalized.db | OfficeID | NormalizedOfficeName   |
                          | _ID      | _Name |

:Mrmls:Mrmls.db  		     | SellID   | SellName |
								  | _ID       | changeto _Name |

endquery
	if not qbe.executeQbe()then
errorShow()
	return
	endif

endMethod






But is says Alias not opened.

Any ideas?

Thanks

 
Rick,

Please also see my other post to you about addAlias.

Assuming the path D:\Pdoxwin\Mrmls exists your code above will have created an alias to it called "MyDir". However, you have set your query to read from an alias called "Mrmls" which your addAlias has not created. (in the ObjectPal examples anything labelled myDir or myTable etc normally means substitute your own name)

Your best bet would have been to use an addAlias instruction of
addAlias("Mrmls","Standard","D:\\Pdoxwin\\Mrmls") rather than addAlias("MyDir","Standard","D:\\Pdoxwin\\Mrmls").

Also rather than hard coding your queries you may wish to create the queries in the Paradox application and use

qVar.readFromFile("your_query")
qVar.executeQBE()

I believe this is how it is done in Version 8.

Don't worry too much about this example as it is a matter of style and maintenance of delivered applications.

I hope that this helps.

Regards

Bystander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top