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

loading a form from another database

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

    loading a form from another database

    Hello board...

    Can someone give me a little direction? I would like to load a form from a database other than the current database. I would like to get some information from the form such as field events form events.... etc. I have been poking around in the *.ddd files outside the current database but so far haven't been able to find a way to load a form.... maybe ya just cant do that....???

    This brings up another question regarding the data dictionaries, including the database *.alb dictionary.

    Some of the field values for contents_m are returning hex values... or maybe encrypted hex. Is there anyway to convert them back to text? Below is an example using the database's *alb dictionary queried on scripts. The first script is named "Print Function" the contents look to be in hex. I tried assigning a blob pointer to the field & doing an ascii dump on the blob, but the results weren't what I expected.

    So I guess I have a couple of calls for help here.... would appreciate some comments.... Thanks

    doug



    tbl = dictionary.open("tcp.alb" )
    query.order = "type"
    query.filter = "type = 'SCRP'"
    tbl.fetch_first()
    ?TBL.field_name_get()
    = Name
    Type
    Contents_c
    Contents_m
    Vendor
    ?tbl.TYPE
    = "SCRP"
    ?tbl.NAME
    = "Print Function "
    ?tbl.CONTENTS_M
    = 0000 : 23 41 35 23 45 4e 49 47 4d 41 23 33 39 33 39 33
    0010 : 39 33 33 39 33 39 33 39 33 39 33 39 33 38 37 33
    0020 : 38 32 39 39 31 31 39 32 38 31 31 23 65 01 00 00
    0030 : 77 26 02 1e 04 19 52 07 17 0b 4c 01 0d 5e f0 50
    0040 : f6 1b 18 10 a0 0a 44 18 e4 ee 5e f5 e1 e1 5b b3
    0050 : e0 37 f1 fa b8 ff f4 f0 2f fc f7 28 c5 b9 b7 c4
    0060 : 3f e5 81 eb c0 17 36 33 f9 82 c4 3a de f1 c5 2b
    0070 : 81 d6 07 93 38 22 da c2 d0 1a c0 dc d4 28 53 02
    0080 : 11 49 14 67 78 0f 01 57 46 06 0a 09 51 05 1c 59
    0090 : ec 5b f1 f4 ec e2 e3 1f e8 fb e5 e9 a3 f7 37 e6
    00a0 : e4 64 ed 5f 54 eb f3 f9 28 f6 b5 bd f7 fe ef 72
    00b0 : e7 fa d5 ea d7 f9 be d1 3a f3 de 31 d6 6d 29 c3
    00c0 : 8c d8 08 dd c1 d2 d8 d8 d2 08 26 1a 0f 09 04 1f
    00d0 : 52 01 18 5a 4d 75 63 02 03 5c 44 19 15 e7 56 06
    00e0 : f0 52 ed e5 e2 e4 e5 ec ee 1f ee e2 27 f4 11 4a
    00f0 : f6 ec f3 07 f0 ef eb b5 b3 3b fc d4 84 eb f8 d7
    0100 : df 2d 04 66 27 c5 c4 cf d9 08 94 c1 cb 51 c4 de
    0110 : da de a5 db c9 d8 d1 3d 10 15 1b 0e 0d 1f 12 53
    0120 : 41 37 78 f7 07 0e 5f f6 1b 14 11 a6 fe 0d e0 1f
    0130 : f4 5e 3d 52 e5 e9 a3 f7 39 f5 f6 b1 ef e9 eb ea
    0140 : fc 3c 37 5c 1b 84 f0 f3 e5 81 eb c0 06 2d 08 c2
    0150 : 87 cd cc e6 c8 de c7 42 2c 29 99 c2 dc c1 de a4
    0160 : f5 fe df de 24 01 0a 16 07 15 47 2c 28 0b 58 12
    0170 : 0b 1d 05 a3 0b e2 74 78 aa 0c f0 e5 e5 18 1b f6
    0180 : 37 5c 04 ae e1 e3 f1 f6 a7 fc f9 fc 2d 57 5a 5b
    0190 : 53 61 6e 29 3f 00

    dim pp as b
    pp=tbl.CONTENTS_M
    ?pp.dump("A")
    = #A5#ENIGMA#39393933939393939387382991192811#e...w&....R...L..^.P......D...^...[..7....../..(....?.....63...:...+....8".......(S..I.gx..WF...Q..Y.[............7..d._T...(......r........:..1.m)...........&.....R..ZMuc..\D...V..R..........'..J.........;.......-.f'........Q.........=.......SA7x..._..........^=R....9........"7\.........-.........B,)..........$.....G,(.X.......tx........7\..........-WZ[San)?.

    #2
    RE: loading a form from another database

    A bit hard to read your unwrapped lines.

    "I would like to load a form from a database other than the current database."

    I do not believe you can do this without having the table in your database. But it can be a "foreign" table, i.e., from another folder, without opening the entire other database.

    I'll leave your second question to someone else.

    Ray

    Comment


      #3
      RE: loading a form from another database

      Thanks for the reply Raymond, sorry about the line wrap, didn't realize it would format that way....

      doug

      Comment


        #4
        RE: loading a form from another database

        .....I'll try it with some hard returns.....

        Can someone give me a little direction? I would like to
        load a form from a database other than the current
        database. I would like to get some information from
        the form such as field events form events.... etc.
        I have been poking around in the *.ddd files outside
        the current database but so far haven't been able to
        find a way to load a form.... maybe ya just cant do that....???

        This brings up another question regarding the data dictionaries, including the database *.alb dictionary.

        Some of the field values for contents_m are returning
        hex values... or maybe encrypted hex. Is there anyway
        to convert them back to text? Below is an example using
        the database's *alb dictionary queried on scripts. The
        first script is named "Print Function" the contents look
        to be in hex. I tried assigning a blob pointer to the
        field & doing an ascii dump on the blob, but the results
        weren't what I expected.

        So I guess I have a couple of calls for help here....
        would appreciate some comments.... Thanks

        doug



        tbl = dictionary.open("tcp.alb" )
        query.order = "type"
        query.filter = "type = 'SCRP'"
        tbl.fetch_first()
        ?TBL.field_name_get()
        = Name
        Type
        Contents_c
        Contents_m
        Vendor
        ?tbl.TYPE
        = "SCRP"
        ?tbl.NAME
        = "Print Function "
        ?tbl.CONTENTS_M
        = 0000 : 23 41 35 23 45 4e 49 47 4d 41 23 33 39 33 39 33
        0010 : 39 33 33 39 33 39 33 39 33 39 33 39 33 38 37 33
        0020 : 38 32 39 39 31 31 39 32 38 31 31 23 65 01 00 00
        0030 : 77 26 02 1e 04 19 52 07 17 0b 4c 01 0d 5e f0 50
        0040 : f6 1b 18 10 a0 0a 44 18 e4 ee 5e f5 e1 e1 5b b3
        0050 : e0 37 f1 fa b8 ff f4 f0 2f fc f7 28 c5 b9 b7 c4
        0060 : 3f e5 81 eb c0 17 36 33 f9 82 c4 3a de f1 c5 2b
        0070 : 81 d6 07 93 38 22 da c2 d0 1a c0 dc d4 28 53 02
        0080 : 11 49 14 67 78 0f 01 57 46 06 0a 09 51 05 1c 59
        0090 : ec 5b f1 f4 ec e2 e3 1f e8 fb e5 e9 a3 f7 37 e6
        00a0 : e4 64 ed 5f 54 eb f3 f9 28 f6 b5 bd f7 fe ef 72
        00b0 : e7 fa d5 ea d7 f9 be d1 3a f3 de 31 d6 6d 29 c3
        00c0 : 8c d8 08 dd c1 d2 d8 d8 d2 08 26 1a 0f 09 04 1f
        00d0 : 52 01 18 5a 4d 75 63 02 03 5c 44 19 15 e7 56 06
        00e0 : f0 52 ed e5 e2 e4 e5 ec ee 1f ee e2 27 f4 11 4a
        00f0 : f6 ec f3 07 f0 ef eb b5 b3 3b fc d4 84 eb f8 d7
        0100 : df 2d 04 66 27 c5 c4 cf d9 08 94 c1 cb 51 c4 de
        0110 : da de a5 db c9 d8 d1 3d 10 15 1b 0e 0d 1f 12 53
        0120 : 41 37 78 f7 07 0e 5f f6 1b 14 11 a6 fe 0d e0 1f
        0130 : f4 5e 3d 52 e5 e9 a3 f7 39 f5 f6 b1 ef e9 eb ea
        0140 : fc 3c 37 5c 1b 84 f0 f3 e5 81 eb c0 06 2d 08 c2
        0150 : 87 cd cc e6 c8 de c7 42 2c 29 99 c2 dc c1 de a4
        0160 : f5 fe df de 24 01 0a 16 07 15 47 2c 28 0b 58 12
        0170 : 0b 1d 05 a3 0b e2 74 78 aa 0c f0 e5 e5 18 1b f6
        0180 : 37 5c 04 ae e1 e3 f1 f6 a7 fc f9 fc 2d 57 5a 5b
        0190 : 53 61 6e 29 3f 00

        dim pp as b
        pp=tbl.CONTENTS_M
        ?pp.dump("A")
        = #A5#ENIGMA#39393933939393939387382991192811#e...w&....R.
        ..L..^.P......D...^...[..7....../..(....?.....63...:...+..
        ..8".......(S..I.gx..WF...Q..Y.[............7..d._T...(....
        ..r........:..1.m)...........&.....R..ZMuc..\D...V..R......
        ....'..J.........;.......-.f'........Q.........=.......SA7x
        ..._..........^=R....9........"7\.........-.........B,)....
        ......$.....G,(.X.......tx........7\..........-WZ[San)?.

        Comment


          #5
          RE: loading a form from another database

          as mentioned, you can add the table from the other database to your database - the path will be the path of the other adb. Then you can make forms for the table.

          you will need to test this, but I'm also almost certain that tbl.is_record_locked() will let you know if a record in the table is locked on the other system/adb.
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            RE: loading a form from another database

            Doug:
            "maybe ya just cant do that....???"
            Yes you can.
            First you have to specify te full path: c:\.....alpha\...
            Then read the dictionary with: a5_dictionary_read

            "Is there anyway to convert them back to text?"
            Yes: *FROM_HEXC()

            Gabe

            Comment


              #7
              RE: loading a form from another database

              Thanks Martin & Gabe....

              I think your right about not being able to use load.form() to load a form that is not attached to the current app Martin, I was just wishing that I could....

              Gabe.... where did you find the a5_dictionary_read method, I was unable to find it in the Alpha5 help.chm?? That method works, but so does dictionary.open().... just the same its good to know. As for the *from_hexc(), it would translate a single value like *from_hexc("41") = "A" but it returns empty when you put the whole string into the function. Also in my earlier post at the bottom you will notice where I assigned a blob pointer to the value & then dumped it as ascii, but rather than returning the code for the script it returns this....

              dim pp as b
              pp=tbl.CONTENTS_M
              ?pp.dump("A")
              = #A5#ENIGMA#39393933939393939387382991192811#e...w&....R.
              ..L..^.P......D...^...[..7....../..(....?.....63...:...+..
              ..8".......(S..I.gx..WF...Q..Y.[............7..d._T...(....
              ..r........:..1.m)...........&.....R..ZMuc..\D...V..R......
              ....'..J.........;.......-.f'........Q.........=.......SA7x
              ..._..........^=R....9........"7\.........-.........B,)....
              ......$.....G,(.X.......tx........7\..........-WZ[San)?.

              If you take each set of hex values & use them in the *from_hexc() it will return the same thing that the dump does, I would expect that is should be returning the code for the script?? I may have to settle on confusion for the moment. I do appreciate both of your comments, & welcome any additional ideas that you or someone else may have....



              Thanks guys,

              doug

              Comment


                #8
                RE: loading a form from another database

                Doug

                Don't make it so hard. This example will open the "invoice" form from Alphasports from any database that can access the path

                form.view("Invoice@C:\Program Files\A5v6\Samples\Alphasports\invoice.set")

                This will open the "customer" form

                form.view("Customer Information@C:\Program Files\A5v6\Samples\Alphasports\customer.ddd")

                Note: you can use the .ddd extension or the .dbf, although the .ddd seems a bit faster.

                While the help files mention the method to use a fully qualified name from within the database, I can find no reference to using the full path, but that is a common method in WAS to open a report for "save as"

                Jerry

                Comment


                  #9
                  RE: loading a form from another database

                  Hi Jerry....

                  Yes, your right.... easy is better! Thank you for the assist!!

                  doug

                  Comment


                    #10
                    RE: loading a form from another database

                    Doug:
                    I must have missed the part about the blob, there was so much garbled stuff which I skipped.

                    If you converted the hex to blob, then you could dump the blob into charachter using: "blob".dump().

                    This leaves me with one curiosity: why do you want to retireve the scripts from another form from another database?

                    If these scripts are global or made to be global, you could with very few mouse strokes attach a dictionary from one database to another. Just curious.

                    Gabe

                    Comment

                    Working...
                    X