My introduction, Neale

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
ny
Posts: 6
Joined: Tue Oct 06, 2020 10:23 am

My introduction, Neale

Post by ny »

My name is Neale (from Australia). In the late 70s I studied Pascal and Fortran at Uni. In the early 80s when IBM compatible PCs came out, I started programming in GW BASIC – probably a backward step that has resulted in me never being 100% comfortable with objects and classes but given I was programming for my own business the main thing was I got the job done.

I started looking for something that supported databases a year or so after Clipper 87 came out and that’s what I settled on and used for the next 10 years. Then in 2001 I moved to VO and have been using it ever since (starting with version 2.0 and moving to 2.6 and then 2.8 ).

Last month I finally got around to trying the VOXporter (2.8 ) and XIDE (1.28) for my main VO project. It took less than a week to get rid of numerous compiler errors. Some were syntax related like using i=1 in FOR loops when I should have been using i:=1. Others were related to really old DBF command usage like INDEX ON which only compiled once I changed to the functional equivalent DBCREATEINDEX (plus I found the need for DBSETORDERCONDITION for descending indexes).

When it came to runtime errors there were a few main issues. First, I could not get DBAPP and DBAPPDELIM to work so I wrote my own code to replace these functions. Second, I could not get Norbert’s GetDocumentByGetOrPost to work which I mentioned in a VO forum thread – my solution, thanks to the forum, was to use Wolfgang’s winHTTP with Phil’s function call wrapper (not yet using .net alternatives because initially I want my code to still work with VO 2.8 ).

I also had some problems using reserved words like DATE as field names in index expressions. In VO I could reference the field using a different name (using DbFieldInfo) and the index would still work when set up with the original DATE name – but X Sharp does not like this so I had to use workarounds to using DbFieldInfo like using Fieldget etc).

Hopefully the above may be of use to other newcomers. The only other issue I have now is when I try to run an old module that uses the old VO data browser I get this message “Cannot load library: CATO3CNT.DLL” – is there something obvious I need to do to correct this?

Regards, Neale
User avatar
Chris
Posts: 4949
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

My introduction, Neale

Post by Chris »

Hi Neale,

Thanks for your information! About INDEX ON, you could had added a

#include "dbcmd.xh"

in the files where you use this and it should work without changes. Regarding DBApp() / DBAppDelim() I am not aware of any related issues, but maybe there's something we are not aware about. Regarding CATO3CNT.dll, fortunately the solution is very easy, just copy all the CAT*.* files from your VO bin folder to your .Net app's bin folder so that they will be found and loaded at runtime!

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ny
Posts: 6
Joined: Tue Oct 06, 2020 10:23 am

My introduction, Neale

Post by ny »

Thanks for that Chris.

I originally tried copying the CATO3CNT dll to the Bin folder but that didn't work. Tried copying all of them and it still didn't work but when I copied them to the actual folder I was running the program in it did work.

I am currently running in C:XIDEProjectsBinDebug so I guess it is just a path issue.

More generally what DLLs if any are required when it comes to redistributing the program? Am I right in thinking most DLLs are compiled into the exe?

Regards, Neale
User avatar
Chris
Posts: 4949
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

My introduction, Neale

Post by Chris »

Hi Neale,

No, .Net dlls are never compiled inside the main .exe, unlike VO those are separate entities. For more info about redistributing dlls, this is taken from theXSharpRedistredist.txt file:

------------------------------------------------------------------
You are allowed to distribute the following XSharp DLLs with your projects:
You are also allowed to distribute the PDB files that come with these DLLs.
These PDB files may help in locating the line numbers where an error occurs.

XSharp.Runtime
================
XSharp.Core.dll
XSharp.Data.dll
XSharp.RT.DLL
XSharp.RT.Debugger.DLL
XSharp.RDD.DLL
XSharp.VO.dll
XSharp.XPP.DLL
XSharp.VFP.DLL
XSharp.MacroCompiler.dll
XSharp.MacroCompiler.Full.dll
XSharp.Scripting.dll
XSharp.CodeAnalysis.dll


VO Compatible SDK
=================
VOConsoleClasses.dll
VORDDClasses.dll
VOSQLClasses.dll
VOGUIClasses.dll
VOReportClasses.dll
VOSystemClasses.dll
VOWin32APILibrary.dll

The following files are needed by VOGUIClasses.dll when you use the DataBrowser or Splitwindow
CATO3CNT.DLL
CATO3DAT.DLL
CATO3MSK.DLL
CATO3NBR.DLL
CATO3SBR.DLL
CATO3TBR.DLL
CATO3TIM.DLL
CATO3SPL.DLL
MSVCRT.DLL

The following file is needed for image support in VOGUIClasses.DLL
CAPAINT.DLL


XSharp Scripting
================
Xsi.exe
XSharp.Scripting.dll
XSharp.CodeAnalysis.dll

These scripting files can all be found in the <Program Files>XSharpBin folder

Support files
=============
Microsoft.DiaSymReader.Native.amd64.dll
Microsoft.DiaSymReader.Native.x86.dll
System.*.dll

These support files can all be found in the <Program Files>XSharpBin folder
------------------------------------------------------------------

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ny
Posts: 6
Joined: Tue Oct 06, 2020 10:23 am

My introduction, Neale

Post by ny »

Thanks again Chris

I used Inno Setup for installing VO apps, is it a good option and/or used by others for X Sharp?

Regards, Neale
FFF
Posts: 1589
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

My introduction, Neale

Post by FFF »

Hi Neale,
welcome!
FTR, there ARE tools to pack all dlls into the exe, e.g. https://www.codeview.net/2020/06/12/pac ... community/, ( i never needed them, as i code only for my own use ;)), but i use apps which come as single file for years.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4949
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

My introduction, Neale

Post by Chris »

Hi Neale,

Well, unless you start installing dlls in the GAC (which generally you do not need to do for distribution), I wouldn't say that distributing a .Net program is any different to regular windows programs, so any installer you like and use for windows apps should work fine also for .Net apps. For XIDE itself, I have written a very simple custom program which simply copies the dlls and support config etc files to the appropriate folders...

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 4551
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

My introduction, Neale

Post by robert »

Neale,
ny wrote:Thanks again Chris
I used Inno Setup for installing VO apps, is it a good option and/or used by others for X Sharp?
Regards, Neale
Inno Setup works fine. We use that to install X# too.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply