0

How can I create a synonym in HyperFileSQL?

I have a table named USER and I cannot Access it via ODBC. I can't rename it, so I want to create a synonym for it. How do I do this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
nawfal
  • 21
  • 3

1 Answers1

0

To create Synonym use this fonction HAlias().

// Create an alias for the ORDERS file
// (Syntax available from version 19)
Orders2013 is Data Source <description=Orders>
IF HAlias(Orders, Orders2013) = True THEN
// ORDERS2013 can now be used in the processes
// It behaves the same way as 
// the ORDERS file described in the analysis.
// Modify the directory
HChangeDir(Orders2013, "D:\SalesMgt\Archive2013")
// Modify the name
HChangeName(Orders2013, "Orders")
HOpen(Orders2013)
... 
// Processes on the Orders2013 file
...
END
// Cancel the alias
HCancelAlias(Orders)
  • I simply want to access the USER table. Since USER is a keyword I can't access the database via ODBC. I have ODBC installed and it works for other tables... – nawfal May 17 '16 at 17:31