hello,
my name is Wolfgang Muellauer.
I am a C# / C++ / XBase programmer and I live in Vienna / Austria.
I have one old but important legacy application written in the 80-ies that I keep running for one customer.
I have been working with Alaska XBase++ 1.90 but as the upgrade to XBase++ 2.00 breaks my application
I started looking for an alternative to Alaska. As I am currently writing all my new apps in C# (mostly WPF - apps)
XSharp would be a perfect fit for me and help me kepp my old codebase alive.
Since yesterday I am a proud FOX and I have already downloaded the 2.4 Compiler and installed it in a VM.
As first step I will try to write some spikes for accessing my Advantage Database Server with the RDD and
then try to move my old code over to XSharp.
I am looking forward to working with this new Development Environment.
Greetings from Vienna
Wolfgang Muellauer
new user - introduction
- wolfgang.muellauer
- Posts: 1
- Joined: Sat Apr 27, 2019 8:20 pm
- Location: Austria
new user - introduction
Wolfgang,
Welcome!
The ADS RDD is built right into the XSharp.RDD assembly. You do not need to load anything, however the ACE32 (32 bits) or ACE64 (64 bits) files and their support files must be provided by you.
To load data with ADS you set a new default driver
RDDSetDefault("AXDBFNTX") or RDDSetDefault("AXDBFCDX") etc. See https://www.xsharp.eu/runtimehelp/html/N_Advantage.htm for a list of RDD names.
If you are accessing local files then that is all you need to do.
If you want to login to a remove server then add a reference to XSharp.RDD and call the function AdsConnect60() to specify the database and login info (https://www.xsharp.eu/runtimehelp/html/ ... nect60.htm) The last parameter is an out parameter that receives the connection handle.
You can then call AX_SetConnectionHandle() and pass that handle. You have to cast the handle to a DWORD before sending it into AX_SetConnectionHandle() . We'll add an overload that takes an intptr in one of the next builds.
Subsequent files that will be opened with one of the advantage RDDs will then use this connection handle.
Robert
Welcome!
The ADS RDD is built right into the XSharp.RDD assembly. You do not need to load anything, however the ACE32 (32 bits) or ACE64 (64 bits) files and their support files must be provided by you.
To load data with ADS you set a new default driver
RDDSetDefault("AXDBFNTX") or RDDSetDefault("AXDBFCDX") etc. See https://www.xsharp.eu/runtimehelp/html/N_Advantage.htm for a list of RDD names.
If you are accessing local files then that is all you need to do.
If you want to login to a remove server then add a reference to XSharp.RDD and call the function AdsConnect60() to specify the database and login info (https://www.xsharp.eu/runtimehelp/html/ ... nect60.htm) The last parameter is an out parameter that receives the connection handle.
You can then call AX_SetConnectionHandle() and pass that handle. You have to cast the handle to a DWORD before sending it into AX_SetConnectionHandle() . We'll add an overload that takes an intptr in one of the next builds.
Subsequent files that will be opened with one of the advantage RDDs will then use this connection handle.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
new user - introduction
Hi Robert, hi Wolfgang,
X# works like Clipper when the Advantage RDD is used:
and no AdsConnect60() call is needed if the data is accessed only through the RDD (I have verified on the ADS console that my test application really uses the remote server).
The AdsConnect60() call is only needed when the AdsSqlServer class is used.
Another possibilty to use ADS from X# is the Advantage.Data.Provider.dll that implements a ADO Data provider (my favorite to access legacy ADS data from new applications - mainly Windows services, but also WPF and Windows Forms applications).
Wolfgang
X# works like Clipper when the Advantage RDD is used:
Code: Select all
function Start( ) as void
local cFileName as string
cFileName := "c:cavoworkeasyfaktv3dbfzako.dbf"
cFileName := "x:easyfaktdbfzako.dbf"
DBUseArea( true, "AXDBFCDX", cFileName, "ZAKO", true, true )
ZAKO->( DBGoTop() )
while ! ZAKO->( EoF() )
System.Console.WriteLine( ( string ) ZAKO->ZAKO )
ZAKO->( DBSkip() )
end
ZAKO->( DBCloseArea() )
return
The AdsConnect60() call is only needed when the AdsSqlServer class is used.
Another possibilty to use ADS from X# is the Advantage.Data.Provider.dll that implements a ADO Data provider (my favorite to access legacy ADS data from new applications - mainly Windows services, but also WPF and Windows Forms applications).
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
new user - introduction
Hi Wolfgang,
As you can see we get even assistance from the Main Guru himself on these forums. We a great community and will help you as much as possible to ease you into X#. Feel free to post your questions on the forums, you will find a speedy answer quite quickly even for the difficult problems. The impossible ones will take a day or two...
Enjoy and have fun!
X# greetings from Sunny South Africa!
Welcome aboard!Wolfgang Muellauer wrote:hello,
my name is Wolfgang Muellauer.
I am a C# / C++ / XBase programmer and I live in Vienna / Austria.
Since yesterday I am a proud FOX and I have already downloaded the 2.4 Compiler and installed it in a VM.
As you can see we get even assistance from the Main Guru himself on these forums. We a great community and will help you as much as possible to ease you into X#. Feel free to post your questions on the forums, you will find a speedy answer quite quickly even for the difficult problems. The impossible ones will take a day or two...
Enjoy and have fun!
X# greetings from Sunny South Africa!
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa