Forum Replies Created

Page 1 of 2
  • Klaus Schrödl

    Administrator
    June 18, 2022 at 8:11 pm in reply to: Omnis running as a Windows Service

    David,

    running the Omnis App Server as as Windows service is really working very well.

    Put your library in the Omnis Startup folder and that’s it. Maybe you have to adapt the code to this a little or you just put a loader library in the startup folder, that is loading the main library in it’s usual environment.
    The default ntserv.ini file looks like this:

    [Service]
    Name=OMNISServerx64
    DisplayName=OMNIS Server x64
    Description=Omnis Web App Server x64
    Program=OMNIS.EXE
    StartType=2

    The Name entry determines the internal name of the service and you can give it the name of your application. But it shouldn’t contain any spaces, special character etc. Also it should be in lower case.
    It is used i.e. for starting/stopping the service via command line:

    net start myservice

    The display name is what appears in the Windows Service panel and may be your application’s full name with spaces, upper and lower case etc. But as short as possible.

    The description also appears in the Service panel and may contain some more words but not too many.

    The Program entry should not be changed as long as you don’t rename omnis.exe (and the depending DLLs)
    StartType means, if the service is startet manually, automatically (2) or if it is deactivated.

    What is really important, is the User Account the service is running under. The account must have the “Run as Service” user pivilege AND should have all necessary rights for executing the particular tasks of your application.
    Running the service at administrator level is not a good idea and may do real harm if your library may contain some bugs (= destructive code). Usually in business environments, a specific service account will be created that is given all the rights to resources as file shares, databases, network access etc. that is effectively needed.

    Cheers
    Klaus

  • Klaus Schrödl

    Administrator
    August 25, 2021 at 2:13 pm in reply to: Convert Microsoft Access to Omnis

    Never heard about a tool like this, sorry.
    Since the internal format of Access forms AFAIK is proprietary and undocumented I even see no way to write a conversion tool.

  • Klaus Schrödl

    Administrator
    May 29, 2020 at 12:38 pm in reply to: VCS omnis studio v. 4.3.2.1

    Hi Simone,
    MS SQL Server works perfect with the Omnis VCS. So you can stay with it.
    Unless you don’t write your own VCS module connecting to GIT, there is no alternative to the VCS.

  • Klaus Schrödl

    Administrator
    March 17, 2020 at 6:13 pm in reply to: Problem with a text file

    Hi Mimmo,
    the three characters you see are the BOM (Byte Order Mark) often used in Unicode files.
    Non-Unicode capable editors or browsers display exactly the three characters you are quoting.
    More about it:
    https://en.wikipedia.org/wiki/Byte_order_mark
    So, if you really want to write UTF-8 Unicode, everything is fine.
    If you don’t need Unicode (and want to omit those characters), you have to use one of the ANSI encodings available i.e.

    kUniTypeAnsiLatin1

    which should be sufficent for your needs.

  • Klaus Schrödl

    Administrator
    February 17, 2020 at 10:52 am in reply to: How to return date/datetime fields as ISO8601

    Hi Dario,
    in Omnis 8 and higher, there are two methods
    iso8601toOmnins()
    omnistoiso8601()
    which should do the job.

  • Klaus Schrödl

    Administrator
    December 3, 2019 at 2:53 pm in reply to: Connect to Oracle with Omnis 10.1 on Catalina.

    Hi Gianni,
    haven’t tried it myself yet.
    But here I found new versions of the MacOS client up to version 19.3.
    https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html
    Maybe one of those will work on Catalina

  • Klaus Schrödl

    Administrator
    December 3, 2019 at 10:27 am in reply to: Connect to Oracle with Omnis 10.1 on Catalina.

    Hi,
    which version of the Instant Client did you use?
    Has this version been working on earlier versions of MacOS togehtehr with Studio 10.1, especially High Sierra and Mojave?

  • Klaus Schrödl

    Administrator
    October 17, 2019 at 11:58 am in reply to: DEBUG constants

    Hi Gigi,
    you’re welcome 🙂

  • Klaus Schrödl

    Administrator
    October 16, 2019 at 11:10 am in reply to: DEBUG constants

    Hi Gigi,
    #DEBUG in VS and debugging in Omnis are two different issues, that cannot be compared directly.
    Major difference is, that in VS an EXE or DLL is being compiled in Debug or Release mode.
    Since Omnis isn’t compiler based, there is no difference between libraries.
    But, and maybe this helps, you can determine by code, if your code/library is running inside a runtime or inside the development IDE.
    The function you can use for that is
    sys(2)
    From the documentation:
    returns the Omnis program type byte:
    bit 0 = full program/IDE (value 1),
    bit 1 = runtime (value 2),
    bit 2 = evaluation (value 4),
    bit 3 = integrated (value 8),
    bit 4 = Unicode (value 16). Always set.
    Note that the current version of Omnis does not support the use of integrated versions.
    So in the runtime, sys(2) will return 18 (bit 1 and 4 set, since I guess you’re working with Omnis 8 or 10 which are only availabe as Unicode version)
    The IDE will return 17 (bit 1 and 4 set)
    Hope that helps

  • Klaus Schrödl

    Administrator
    April 24, 2019 at 3:24 pm in reply to: Home User path

    Hi Paolo,
    there is a funtion in Omnis Studio called
    getenv(NameofEnvoronmentVar)
    To retrieve the current user’s home directory under windows it would be
    Do getenv(“userprofile”) Returns lcUserProfile
    where “userprofile” is the name of the corresponding environemt variable.
    The function also works on Mac OS but I don’t know the variable name there.
    G… should know.
    Cheers
    Klaus

  • Klaus Schrödl

    Administrator
    April 17, 2019 at 3:28 pm in reply to: scope variable

    Hi,
    the easiest way would be to make the variable a task var, so it’s “visible” in the whole application. But that’s not a good or elegant approach.
    The better way would be to create a public method (starting with the $) in the second form, to make it accessible from outside, i.e. $setmyvalue with a parameter of the required type. And then call it from the first form
    Do $iwindows.InstanceNameOfSecondForm.$setmyvalue(iVarFromFirstForm)
    Hope that helps
    Klaus

  • Klaus Schrödl

    Administrator
    April 3, 2019 at 1:44 pm in reply to: Droplist inside a grid cell

    Great to hear 🙂
    You’re welcome!
    Cheers
    Klaus

  • Klaus Schrödl

    Administrator
    April 1, 2019 at 5:06 pm in reply to: Droplist inside a grid cell

    Hi Coralie,
    I suppose, you’re talking about standard Windows Forms (Fat client), not the jsClient.
    There you have (at least) two possibilities:
    1. Use a complex grid. Each data column can be represented by almost any control like en try fields, check boxes and of course droplists.
    2. Use a datagrid, set the $userdefined property to kTrue, the $columntype of the particular column to
    kDataGridDropListPicker and the $columnpicklist property to the list variable containing the values to be displayed in the droplist AND the values corresponding to the list column being displayed/set in this column.
    The columns picklist at least has to have two columns:
    First column contains a string value being displayed when the user clicks on the droplist.
    Second columns contains the values being set in the list behind the datagrid and preferably should have the same data type.
    HTH
    Cheers
    Klaus

  • Klaus Schrödl

    Administrator
    October 3, 2018 at 9:26 am in reply to: OAuth

    Hi Paul,
    great to hear, you solved the issue. Thank you for posting the solution!

  • Klaus Schrödl

    Administrator
    August 22, 2018 at 9:31 am in reply to: OAuth

    Hi Paul,
    the Omnis list is being mirrored on this site:
    https://developer.omnis.net/omnislist
    It’s fully searchable with the widget in the right pane or at the page bottom in the mobile version.
    Klaus

Page 1 of 2