Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Sample for building forms based on a Postgres DB 27 May 2021 09:39 #18678

  • RGreim4XS
  • RGreim4XS's Avatar
  • Topic Author


  • Posts: 41
  • Hi,
    I have now a working environment with a Postgres Server running on a IMac .
    I can connect to DB with Visual Studio via npgsql.
    There are many samples using C#.
    But what is the best way to do it with XIDE/ VS ?
    Do I need extra paid libs / runtimes ?
    I remember from my past, everytime I say enterprise or server I have to spent extra money.
    This is one of the reasons why.I’m still using DBFs .


    Thx for pointing me to PostgressSQL in my last post ( database question)

    Rainer

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 27 May 2021 19:06 #18680

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3366
  • Hi Rainer,
    for a new SQL based application there is a basic question: what GUI? WPF or Windows Forms?
    I'm build my new applications nearly entirely using WPF and MVVM - and using XIDE, building the forms in code and not in XAML as most others. This is because I prefer XIDE over VS, and second because I feel that building forms code based gives me more flexibility.
    And if you find code using C#: why not transport that to X#?
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 27 May 2021 19:55 #18681

    • RGreim4XS
    • RGreim4XS's Avatar
    • Topic Author


  • Posts: 41
  • Hallo Wolfgang, when I start with x# I want to use the x# Infrastructure and tools.
    As Im an old FoxPro and Java dude, I have tools for doing most of my work , as I worked for a long time with datadriven frameworks , code generators, ORM mappers and more.

    If.taking c# code to adapt it to x# why not.

    Thanks again., also for the hint about MVVM.

    Rainer

    Please Log in or Create an account to join the conversation.

    Last edit: by RGreim4XS.

    Sample for building forms based on a Postgres DB 28 May 2021 06:09 #18682

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3366
  • Hi Rainer,
    unfortunately there are no such things in the X# language.
    But - and this is the real great thing: you can use any C# library you like as it were a X# library.
    Personally, I like the X# language as it is easy to read and understand (much easier than C#), and because there are things like the macro engine and the RDDs (and not to forget the tons of legacy code I have to maintain and to move forward).
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 28 May 2021 08:32 #18683

    • RGreim4XS
    • RGreim4XS's Avatar
    • Topic Author


  • Posts: 41
  • Hallo Wolfgang, da gehts mir besser, VFP lass ich’s wies ist, und fang neu an,

    Ist schon cool, das Robert soviel Energie in X#,steckt.
    In meinen News heists immer, nimm .net und Java und blos kein / VFP, /…
    6:00 , schläfst Du eigentlich auch…
    VG Rainer

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 28 May 2021 10:07 #18684

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3366
  • Hi Rainer,
    fortunately my VO applications are critical for my customers businesses, so I need to keep them running and need also to modernize the base.
    And using X# you are effectively using .NET - and you can use all the tools and libraries and code samples that are available.
    Wolfgang
    P.S. my working day starts at 5:30 and normally ends at 19:00 - my home and my office are in the same building
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 28 May 2021 13:29 #18686

    • ic2
    • ic2's Avatar


  • Posts: 1667
  • Hello Wolfgang,

    RGreim4XS wrote: If.taking c# code to adapt it to x# why not.


    Why not? Because, even using ILSpy, I am often unable to translate more elaborate C# code to working X# code. So I end up asking it here, which always gives me the requested reply.
    But, as it is very easy to have C# code and X# code in one solution and then call methods from the C# code from X#, I found that I prefer to keep the code in C#. C# is a terrible program language compared to X# but when I find a working starting point in C# it is often easier and less time consuming to continue in C# than to try to translate it first.

    Dick

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 30 May 2021 13:00 #18690

    • RGreim4XS
    • RGreim4XS's Avatar
    • Topic Author


  • Posts: 41
  • Hello Wolfgang,with all the. work, don’t forget worklife balance..
    Stay healthy Rainer

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 30 May 2021 15:54 #18691

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3366
  • Hi Rainer,
    I'm so lucky to live in a place where other people comes to pass their holidays.
    So, even if I'm now back to work, today I was on the first mountains peak for this year.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it
    Attachments:

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 21 Jun 2021 12:04 #18881

    • RGreim4XS
    • RGreim4XS's Avatar
    • Topic Author


  • Posts: 41
  • Hello Wolfgang,
    im living at Swabian Alb near Ulm. Also a very nice place. Sometimes I can also see the Alps.
    This is my summer home office..
    BR Rainer
    Attachments:

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 21 Jun 2021 12:17 #18882

    • lumberjack
    • lumberjack's Avatar


  • Posts: 721
  • Hello Rainer,

    RGreim4XS wrote: Hi,
    I have now a working environment with a Postgres Server running on a IMac .
    But what is the best way to do it with XIDE/ VS ?
    Do I need extra paid libs / runtimes ?
    I remember from my past, everytime I say enterprise or server I have to spent extra money.
    This is one of the reasons why.I’m still using DBFs .
    Thx for pointing me to PostgressSQL in my last post ( database question)

    Sorry for late reply, but was without internet for 2 months.

    As Wolfgang and others, I am also a fan of PG. I am also doing Data-driven and have a couple of articles in the Download section which might help you.

    Feel free to contact me if you need any help, specially with dynamic PG stuff.

    Kind regards
    ______________________
    Johan Nel
    Boshof, South Africa

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 21 Jun 2021 22:17 #18885

    • RGreim4XS
    • RGreim4XS's Avatar
    • Topic Author


  • Posts: 41
  • Hi, thx for the great support.
    Rainer

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 22 Jun 2021 12:37 #18886

    • Juraj
    • Juraj's Avatar


  • Posts: 159
  • Hi Johan,
    how to transfer a postgres database from client computer to another computer without a network?

    Juraj

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 22 Jun 2021 12:52 #18887

    • lumberjack
    • lumberjack's Avatar


  • Posts: 721
  • Juraj,

    Juraj wrote: Hi Johan,
    how to transfer a postgres database from client computer to another computer without a network?
    Juraj

    The "official" way is to use pg_backup and pg_restore.
    You can also backup/restore from pgAdmin.

    If the computers have the exact same setup and version, I have also simply copied the PostgreSQL data folder with subfolders onto the other computer. Just make sure you stop the PG services before you do it.

    HTH
    ______________________
    Johan Nel
    Boshof, South Africa

    Please Log in or Create an account to join the conversation.

    Sample for building forms based on a Postgres DB 22 Jun 2021 13:06 #18888

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3366
  • Hi Juraj,
    I'm using this script to save to a .gz file (Linux):
    su - postgres -c "pg_dump -c db90273">/root/db90273.sql
    gzip /root/db90273.sql
    mv /root/db90273.sql.gz /home/Daten/temp/
    and this one to restore:
    mv /home/Daten/Temp/db90273.sql.gz .
    gunzip db90273.sql.gz
    su - postgres -c 'psql db90273'<db90273.sql
    rm db90273.sql
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Last edit: by wriedmann.
    • Page:
    • 1