Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Desktop app using mySQL and V12

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Desktop app using mySQL and V12

    All of my experience with Alpha has been with web development.
    Now I have been asked to create a desktop app with mysql and I'm at a loss of how to start.
    I know I want a grid and I have developed that. It works fine in Working Preview but if I try using Live Preview I get an HTTP 500 error which if I view in Chrome shows:

    Script Error
    Error:Script:" /LivePreview/Cemetery1_LivePreview.a5w" line:56
    x_out = a5_ajax_grid(tmpl)
    WebSecurity: User is not found

    I don't even have Security turned on. Nor do I have Users. And I thought these only applied to web apps.
    Looking up Live Preview in the docs, I found only one entry and it had to do with using any installed browser.

    So I guessed that I needed a form to put the grid on but I can't create a new form because Alpha says there are no tables in this workspace, in spite of the fact that I have a grid designed.
    I have noticed comments on the forums about how Alpha has deserted desktop developers. They didn't mean much to me while I was developing for the web but now I know what they mean!

    Maybe I've just been working too hard and the solution is obvious but at the moment I'm stumped.

    #2
    Re: Desktop app using mySQL and V12

    Garry,
    Wish I could help you. I do only desktop in alpha. Never had a need for a grid or sql. I use only dbf on desktop and create forms for it to input. V12 is much better than v11 for desktop.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    Comment


      #3
      Re: Desktop app using mySQL and V12

      Garry,

      The desktop forms require a table. Create a DBF called menu. I have a single record in my MENU.DBF that contains constant information, such as the (owner's) name and address, counters, etc. You can use this as your base table then add your calls to MySQL. Hope this helps.

      Comment


        #4
        Re: Desktop app using mySQL and V12

        Garry.
        You need an SQL database with the tables and fields defined.
        Then, go to the DT Control Panel and Add a Table.
        Select the Passive or Active link and connect to the SQL Db.
        You will now have a table, on which you can build the Form.

        The Dt form is simply a front end replication of the SQL table and is used to update that table, but you need a copy of the table on the Dt..
        It really works very well once you get your head around it.

        Just remember that the application needs to be Dt, and will be using the SQL Db as a repository. So you will have 2 things to contend with.
        SQL backend will be a lot slower than native DBF, and you can still use grids with DBF. Possibly a rethink needed?
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #5
          Re: Desktop app using mySQL and V12

          Ted

          I would add that all objects should be built on a set. Even if it's a one table set.

          A passive link table rebuilds the table during a refresh and that wipes out objects built on the table.
          Al Buchholz
          Bookwood Systems, LTD
          Weekly QReportBuilder Webinars Thursday 1 pm CST

          Occam's Razor - KISS
          Normalize till it hurts - De-normalize till it works.
          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
          When we triage a problem it is much easier to read sample systems than to read a mind.
          "Make it as simple as possible, but not simpler."
          Albert Einstein

          http://www.iadn.com/images/media/iadn_member.png

          Comment


            #6
            Re: Desktop app using mySQL and V12

            An alternative to passive and active link tables is to create the tables you want in Alpha (native dbf) and empty and refresh them with SQL::ResultSet::ToOpenTable() as desired. This preserves the layouts you create.
            There can be only one.

            Comment


              #7
              Re: Desktop app using mySQL and V12

              Now all we need is the originators response.
              See our Hybrid Option here;
              https://hybridapps.example-software.com/


              Apologies to anyone I haven't managed to upset yet.
              You are held in a queue and I will get to you soon.

              Comment


                #8
                Re: Desktop app using mySQL and V12

                Garry,

                I too would be interested to see how you have done since this post. You CAN build a desktop application, that runs in RUNTIME, that is fully SQL (with no "active link table) and is 100% web components*.

                * You need ONE dbf based form to create the main menu, but that is the only DBF/desktop object you need. Web Security is NOT applicable in this scenario, not sure how you got your original error message.

                Here is a video of my work in this area: http://www.screencast.com/t/c9pqRIs6Nc
                Steve Wood
                See my profile on IADN

                Comment


                  #9
                  Re: Desktop app using mySQL and V12

                  Hi Steve,

                  Great overview. Thanks
                  Tim Kiebert
                  Eagle Creek Citrus
                  A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                  Comment


                    #10
                    Re: Desktop app using mySQL and V12

                    Originally posted by Steve Wood View Post

                    * You need ONE dbf based form to create the main menu, but that is the only DBF/desktop object you need. Web Security is NOT applicable in this scenario, not sure how you got your original error message.
                    You can build an xdialog based main menu and eliminate the need to base the menu on a dbf table.

                    Including the web menu using the html object in xdialog.
                    Al Buchholz
                    Bookwood Systems, LTD
                    Weekly QReportBuilder Webinars Thursday 1 pm CST

                    Occam's Razor - KISS
                    Normalize till it hurts - De-normalize till it works.
                    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                    When we triage a problem it is much easier to read sample systems than to read a mind.
                    "Make it as simple as possible, but not simpler."
                    Albert Einstein

                    http://www.iadn.com/images/media/iadn_member.png

                    Comment


                      #11
                      Re: Desktop app using mySQL and V12

                      I just noticed I need to redo this video! I watched it for fun, and at 2:49 is shows all of the DBF tables and says it "is a DBF-based application". It started out that way, but is fully SQL now!. Since then I have also added an Installer that pulls down the Alpha RUNTIME from my website during install, and sets up their MySQL database as an initial step.

                      I should say that, although this "Desktop/Web app is cool" just like in the days of distributed desktop software, having this software reside on the client's machine is a pain compared to running as SaaS. In this case the client mandated it because of the sensitive nature of the data. But like all things, that position is softening over time and the client is considering uploading their data to our server and then we can avoid putting the software on their machine.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Desktop app using mySQL and V12

                        Wow! It's hard to believe a month has gone by since I posted this question... and the project is now a month behind!
                        I really must apologise to all of you who offered help. The reality is that I am the IT department for about 35 businesses and 15-20 individuals and October brought a rash of clients updating from Windows XP. However I'm now back in programming mode so here is an update on where I am.

                        The original application which I have been retained to update is old, visually ugly, and written in M/S Access with a poorly designed database. On the other hand it is relatively simple and has only one table and runs on a single machine (although they would like to add read only access from an additional workstation).

                        Ted: Following your instructions, I can now access the mysql database from a desktop form.
                        You may be right about a re-think being required. I have over 30 years experience with dBase, Clipper, FoxPro, and xBase++ so I'm quite familiar with the environment. I originally considered converting the app to use mysql because that is what I have used exclusively for my web programming - and I haven't really missed the necessity of writing a re-indexing routine for every program to look after the inevitable problems due to index corruption caused by improper shut down, etc. Data security also seems better in mysql.

                        Steve: Thank you for the video link to your Data Blender app. It was very helpful and looks like a good starting point for WCD's. BTW, the error I posted was due to trying to use Live Preview for a desktop app and there is of course no server running.

                        It appears that desktop programming with Alpha involves another whole new learning curve and the Help files seem next to useless for that purpose.
                        Virtually every program I have written has been net workable and multi user without any changes to the under lying code so the division of server side and client side programming requires some adjustment on my part. Also, I come from a very object oriented background so this genie oriented code generation is somewhat foreign to me.

                        Again, thanks to all who offered suggestions.

                        Comment


                          #13
                          Re: Desktop app using mySQL and V12

                          Having also come from dbase, clipper and others. I do not understand why not dbf files. I have many apps out there written that have no security problems since I can lock tables(table encryption). No index problems. dbf is faster on a desktop than sql. Forms/reports/etc all work faster. There is no problem with a second set of eyes/computer(s) in read only mode or working mode.

                          From what you have described, it seems a simple job to convert to native dbf in alpha, build the forms and other to be done. encrypt and table that has need and go on.
                          I can build what you have described way faster than anyone using sql. It will also run faster and be as secure as the system it is on.

                          Either way, Good Luck.
                          Dave Mason
                          [email protected]
                          Skype is dave.mason46

                          Comment

                          Working...
                          X