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

How do I decrypt a DBF file encrypted by alpha in a desktop application

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

    How do I decrypt a DBF file encrypted by alpha in a desktop application

    I have a huge desktop application built on DBF files.
    I'm trying to create a WEB app which needs to read data from some of these files.

    When I build the WEB app, the desktop app is running and the key has been sent
    using the function 'default_encryption_key_set("mypassword").

    But when I run the WEB app from the server, the app won't log in.
    As best as I can determine, the files are still encrypted and can't be read.

    "Error executing event 'onLogin ': command: e.userNameFriendly = lookup("[PathAlias.ADB_Path]\wodesclabor_m_entry_mech1","u error: lookup([PathAlias.ADB_Path]\wodesclabor_m_entry_mech1,user="testuser",Name) Table is encrypted using a different key."

    Has anyone dealt with this before?

    Thanks,

    Ron
    Last edited by Ronald Anusiewicz; 03-04-2016, 05:51 PM.
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    #2
    Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

    I did a long time ago and don't remember everything. The Table.Open() method allows for the use of an encryption key password, e.g.

    t = table.open("MyTable", file_ro_shared, "", "MyEncryptPassword")

    This would mean you'd need to write table queries rather than use the built-in Lookup() functions.

    Of course there may be more options, but it's what I remember.
    -Steve
    sigpic

    Comment


      #3
      Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

      Hi Steve, That works great where I can write xbasic. But it appears when building UX components like lists, I haven't seen a way to use xbasic or add in the key. Ditto for binding a table.

      Thanks
      Alpha 5 Version 11
      AA Build 2999, Build 4269, Current Build
      DBF's and MySql
      Desktop, Web on the Desktop and WEB

      Ron Anusiewicz

      Comment


        #4
        Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

        Maybe someone who's done some / more of this lately will have some ideas. But you're going to find a few things (and probably more and more as time goes on) that are not really built for DBFs, and require some SQL back end. Yeah, moving a DBF system to SQL takes a bit of work but once you get things organized, it goes pretty smoothly - doing one of those myself right now.
        -Steve
        sigpic

        Comment


          #5
          Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

          Hi Ron,

          Try:

          default_encryption_key_set(tkey)

          where tkey is the password
          Gary S. Traub, Ph.D.

          Comment


            #6
            Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

            Sorry Ron. I just re-read the post. Where are you using that statement? I use it right on the page and it works fine.
            Gary S. Traub, Ph.D.

            Comment


              #7
              Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

              Yeah, moving a DBF system to SQL takes a bit of work but once you get things organized, it goes pretty smoothly - doing one of those myself right now.
              The desktop app started about 20 years ago and changes are being made monthly. About 75 tables, hundreds of scripts, reports, browses, etc...
              All I really know are dbf's and they have been working fine.

              All I want to do is make a small mobile app connected to about 6 tables. Those tables are connected to many more on the desktop side.
              I have no grids or dialogs, just UX components.

              Sorry Ron. I just re-read the post. Where are you using that statement? I use it right on the page and it works fine.
              Hi Gary,

              I'm not using any A5W pages except for the index.a5w used to log in. All of the rest of the app is built on UX components. Steve mentioned 'default_encryption_key_set(tkey)' but I really don't know where to put it.

              I have decrypted the tables and the app works so I know for sure that encryption is the problem.
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #8
                Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                Can you try it in the main ux OnDialogInitialize event?
                Gary S. Traub, Ph.D.

                Comment


                  #9
                  Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                  e.userNameFriendly = lookup("[PathAlias.ADB_Path]\wodesclabor_m_entry_mech1"
                  i could be way off since i don't have version 12.
                  it seems to me that you are using lookup function to get the name of the user to display in user friendly terms. lookup function does not allow password to be passed according to alphapedia.
                  can you use as steve suggested table open and get the user name that corresponds to the filter you are using to return a value that will be displayed?
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #10
                    Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                    Ron,

                    I looked at my mobile app, and I put the code in the OnDialogExecute of my UX. Works for me. Hope this helps.

                    See image
                    Attached Files
                    Gary S. Traub, Ph.D.

                    Comment


                      #11
                      Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                      Originally posted by drgarytraub View Post
                      Ron,

                      I looked at my mobile app, and I put the code in the OnDialogExecute of my UX. Works for me. Hope this helps.

                      See image
                      Thanks Gary,

                      Been away but I'm anxious to try it. I'll let you know how I make out.

                      Ron
                      Alpha 5 Version 11
                      AA Build 2999, Build 4269, Current Build
                      DBF's and MySql
                      Desktop, Web on the Desktop and WEB

                      Ron Anusiewicz

                      Comment


                        #12
                        Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                        Thanks Gary,

                        Works like a champ. Same function as I use on the desktop, I just didn't know where to put it.

                        Now, think you could help me with my print issue.
                        Alpha 5 Version 11
                        AA Build 2999, Build 4269, Current Build
                        DBF's and MySql
                        Desktop, Web on the Desktop and WEB

                        Ron Anusiewicz

                        Comment


                          #13
                          Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                          I wonder if this would work as well on the onDialogInitialize event, which fires only once when the component is loaded? The reason I ask is that the onDialogExecute event can fire many more times during the components' "lifetime" including on every AJAX callback. Going with the Initialize event would have some performance benefits, esp. if you're getting your key out of a table as I think Gary is here.
                          -Steve
                          sigpic

                          Comment


                            #14
                            Re: How do I decrypt a DBF file encrypted by alpha in a desktop application

                            Steve,

                            Your point is well taken and I agree, but there was a reason why I moved it out of the Initialize event which I do not recall at the moment.

                            Ron,

                            I am not sure of what printing problem you are referring to, but I bet it has to do with the fact that the Report Server does not support encryption in DBF tables. The solution is to disable the Report Server in Project Properties.

                            See image attached

                            ron printing.png
                            Gary S. Traub, Ph.D.

                            Comment

                            Working...
                            X