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

Mess display incorrect sequence

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

    Mess display incorrect sequence

    Hi there,

    I have a script attached to a button which includes ba

    To arrive at my problem on the attached database :

    1. From Control Panel invoke Form, Main menu
    2. From the resulting Form select button "Debtors Ledger - 1"
    3. From the resulting Form select button "Restore Import Database"
    4. The correct actions take place but they are out of sequence. Examine OnPush events. Restore database dialog box (first action) runs after "display a message box" (second action).

    How do I get the actions to conform the the sequence I want. That is restore first and display message box last ?

    Any ideas

    Looking forward
    Dave Mac

    It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

    #2
    Re: Mess display incorrect sequence

    Originally posted by Dave Mac Callum View Post
    3. From the resulting Form select button "Restore Import Database"
    Oops, You will not be able to restore without by backup.

    Rather select Button "Backup Import Database - B"

    This gives that same problem.
    Dave Mac

    It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

    Comment


      #3
      Re: Mess display incorrect sequence

      Dave, Dave, Dave,

      I know you read this forum, why oh why do you have spaces in filenames?????

      I could not backup because it is obvioulsy hard coded to drive f:

      Any other ideas for me to duplicate?

      Thanks
      Cheryl
      #1 Designs By Pagecrazy
      http://pagecrazy.com/

      Comment


        #4
        Re: Mess display incorrect sequence

        Hi there Cheryl,

        Thanks for your interest.

        By file name do you mean Table name ? Such as Company data ?

        No one has commented on this before. I assume by your comment that this is not good ?

        Apologies for giving you a problem you cannot duplicate. I have altered backup to c: drive. Hope this helps
        Dave Mac

        It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

        Comment


          #5
          Re: Mess display incorrect sequence

          Hi Dave,

          By file name do you mean Table name ? Such as Company data ?
          YES. Having spaces in filenames (tables, sets, forms, browses, fields, reports, operations, code) has been known to cause problems. If you must have a 'spacer' between words then it is best to use an underscore. Company_data

          I will look at your new zip file later this afternoon :)
          Cheryl
          #1 Designs By Pagecrazy
          http://pagecrazy.com/

          Comment


            #6
            Re: Mess display incorrect sequence

            Hi Dave,

            Sorry it took so long for me to reply (been banging my head up against the wall with another problem).

            I was able to duplicate your problem. Unfortunately I do not have a resolution for you. The problem has something to do with the code that alpha is using for the backup process. I have looked through the code but have not been able to determine what needs to be modified.

            I know it is in the backup code because I have a backup code that another developer uses, and if I substitute that code, the backup runs successfully and your message comes up last.

            So my only resolution is to write your own backup code OR not use your own message box and just accept the final message that alpha puts up saying that the backup has been completed.

            Maybe somebody else knows what portion of alpha's backup code is causing it to first display your message before running the actual backup.

            Good luck
            Cheryl
            #1 Designs By Pagecrazy
            http://pagecrazy.com/

            Comment


              #7
              Re: Mess display incorrect sequence

              Dave,

              Spaces are bad news like Cheryl said and try to keep the table and other names as short as possible. Have known programmers that named their tables by the alphabet( 1 letter), but think that is a bit extreme. I try to name folders, tables and everything else like I only had eight letters available with no underscores or. Some are actually 10.

              If your actions are going one after the other, you may be running into a timing issue. Means, backup is not be finished before the others start.

              Solution Stan helped me with was to put it into seperate udfs and the run them by way of a udf. Sounds terrible, but it sure did work great.

              That would possibly be view the steps in xbasic, copy the xbasi and the write a udf for each of your steps. You may have 3 or 4 udfs at this point. Test them of course. The make a udf that will run them in the proper sequence. Udfs are vastly faster than action scripting or scripts. What was taking a couple of minutes to run now runs if 10 to 15 seconds.

              Hope I read your message right and this helps you.

              Dave
              Last edited by DaveM; 10-23-2007, 10:35 PM.
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: Mess display incorrect sequence

                Hi Dave,

                Your idea is a great one, but it did not work. I did exactly that as part of my testing by copying the action scripting code into a UDF. I then called the UDF in my button, added an xbasic_wait_for_idle() just in case, and then the message box.

                The UDF begins with letting me know that I need to close all windows and asks me if I want to proceed. I say OK, then the message box appears, then the actual backup begins after I press OK on the message box.

                That is when I tried my own personal backup script which ran flawlessly and completed before the message box appears. That is how I determined that there was something in the xbasic behind the action script itself.
                Cheryl
                #1 Designs By Pagecrazy
                http://pagecrazy.com/

                Comment


                  #9
                  Re: Mess display incorrect sequence

                  this part is actually a script.
                  Code:
                  'Date Created: 12-Oct-2007 11:08:25 AM
                  'Last Updated: 17-Oct-2007 05:17:39 PM
                  'Created By  : dave
                  'Updated By  : dave
                  functions_get(invget1(var->scode),"*")'get the data from aaa.csv into table
                  functions_get(invget2(var->scode),"*")'change the field names
                  functions_get(invget3(var->scode),"*")'fix the makes
                  functions_get(invget4(var->scode),"*")'fix the cost to actual cost
                  functions_get(invget5(var->scode),"*")  'fix the years to 4 digits
                  functions_get(invget6(var->scode),"*")  'Append it all to inventor
                  functions_get(invget7(var->scode),"*")  'get the old used units out of Inventor
                  it starts each funtion in order.

                  This is the first function run which imports a csv file into a table.
                  Code:
                  FUNCTION invget1 AS C (de as c)
                   invget1 = "xxx"
                  script_play("invimportGet")
                  END FUNCTION
                  It has to run and complete before any of the rest are useable

                  this is the script called by the above function. It takes time to run.

                  Code:
                  dim shared madetable as c
                  madetable =:a5.Get_Master_Path()
                  madetable = madetable+"\invimp.dbf" 
                  import_destination_table = filename_decode(madetable)
                  
                  dim global mymasterpath as c
                  mymasterpath=:a5.Get_Master_Path() 
                  mymasterpath = mymasterpath+"\AAA.csv"
                  import_filename = filename_decode(mymasterpath)
                  if file.exists(import_filename) = .f. then
                  	ui_msg_box("Error","File to import not found: '"+import_filename+"'.",ui_stop_symbol)
                  	end
                  end if
                  
                  ON ERROR GOTO ERROR12102007110520937
                  
                  
                  import.type = 0
                  import.names = "use"
                  import.file = import_filename
                  import.db = import_destination_table
                  import.skip_lines = 0
                  import.skip_bytes = 0
                  import.field_sep = ","
                  import.record_sep = "<CR><LF>"
                  import.text_qualifier = "\""
                  import.record_len = 0
                  import.rem_blanks = .F.
                  import.escape_newlines = .F.
                  import.fields = 10
                  import.field1 = "days,n,0,3,0"
                  import.field2 = "stock_no_,c,1,8,0"
                  import.field3 = "yr,c,2,4,0"
                  import.field4 = "make,c,3,12,0"
                  import.field5 = "model,c,4,12,0"
                  import.field6 = "color,c,5,12,0"
                  import.field7 = "body,c,6,12,0"
                  import.field8 = "serial_no_,c,7,20,0"
                  import.field9 = "miles,n,8,9,0"
                  import.field10 = "price,n,9,10,2"
                  import()
                  
                  
                  GOTO CONTINUE12102007110520937
                  ERROR12102007110520937:
                  ON ERROR GOTO 0
                  ui_msg_box("Error","Error running Import Operation"+crlf()+error_text_get())
                  END
                  CONTINUE12102007110520937:
                  
                  'Add the import destination table to the database....
                  file_add_to_db(table.filename_get(import_destination_table))
                  This is the second funtion and you can see why the other needed to be done first.
                  Code:
                  FUNCTION invget2 AS C (scripter2 as c )
                  scripter2 = "XXX"
                  dim global thedpath as c
                  thedpath = A5.GET_PATH() + "\\"
                  thedpath = thedpath+"\invimp.dbf"
                  table.fieldname_change(thedpath, "Stock_NO_", "Stock")
                  table.fieldname_change(thedpath,"Serial_no_", "Vin")
                  table.fieldname_change(thedpath,"Price", "Cost")
                  table.fieldname_change(thedpath,"Yr", "Year") 
                  END FUNCTION
                  The last one(7th) does an append to another table.

                  cheryl, I had no luck with the wait functions and is why I went to this.

                  i hope it gives you an idea

                  dave
                  Last edited by DaveM; 10-24-2007, 10:37 AM.
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: Mess display incorrect sequence

                    Originally posted by Cheryl Lemire View Post
                    So my only resolution is to write your own backup code OR not use your own message box and just accept the final message that alpha puts up saying that the backup has been completed.
                    Hi Cheryl and Dave,

                    Thanks for the assist. I really appreciate the time spent in giving me direction.

                    Udf's a completely new to me and will probably have to get into them for my own good. However, at this point I need to get this product to my users and have decided to discard my message and accept the final message that Alpha puts up saying that the backup/restore has been completed.

                    Trust that you both benefitted with your discussion on this subject.

                    Have a good day
                    Dave Mac

                    It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

                    Comment


                      #11
                      Re: Mess display incorrect sequence

                      Originally posted by Cheryl Lemire View Post
                      Dave, Dave, Dave,

                      I know you read this forum, why oh why do you have spaces in filenames?????

                      I could not backup because it is obvioulsy hard coded to drive f:

                      Any other ideas for me to duplicate?

                      Thanks
                      Dave Mac

                      It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

                      Comment


                        #12
                        Re: Mess display incorrect sequence

                        Hi Cheryl,

                        Ever since you despairingly advised I was heading for trouble by including spaces in my filenames, I have been wanting to alter file names to include underscores. I started by altering Table names that included spaces. Once I had altered the table name, I ran into trouble (I think) with forms that used these tables. I seem to remember that I could not amend the form. Apologies for being so vague. The problem is that when I started to work on this db the next day, it seems that it had resolved itself, and I could amend the form.

                        The table name that I altered was "Trade Transactions". I altered it to Trade_Transactions". Using Windows explorer, I notice that both "Trade Transactions" and Trade_Transactions" were listed, even though table "Trade Transactions" is no longer on the Control Panel Tables.

                        Do you think it is safe to delete, at the windows explorer level, "Trade Transactions" events from the db ? Have you experienced this type of thing before ?

                        I was complacently developing my systems without a care in the world until you came along. Seeing that you are the cause of my sleepless nights I hold you responsible for getting this right.

                        I am attaching screen dumps so you can see what's going
                        Dave Mac

                        It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

                        Comment


                          #13
                          Re: Mess display incorrect sequence

                          Dave,

                          When making changes it's vital to keep good backups, so backup everything first.

                          Then, do your renaming from within Alpha Five. The option to rename a table is found on the utilities submenu if you right click the table name. This is also the best place to detach (drop) a table, or to delete a table. The database dictionaries keep track of which tables have been "added" to (and now comprise) the database. If you change the table name with windows explorer this does nothing to update the database dictionaries. So, make these changes from within Alpha Five so Alpha Five can keep the database dictionaries current.

                          Comment


                            #14
                            Re: Mess display incorrect sequence

                            Hi Tom,

                            Thanks for your input.

                            Don't worry, I'm scared of changes and I back up continuously.

                            The way you described is actually the way that I do alter table names. How I was aware that there was both "Trade_Transactions" and "Trade Transactions" is that the resulting backup (when viewing) had suddenly grown in size.

                            Windows Explorer shows that I now have the table "Trade Transactions" files in the db folder and no "Trade Transactions" table in the Alpha Control panel. It seems that I will have these superfluous entries in the db folder forever !

                            How do I get rid of "Trade Transactions" files ?
                            Dave Mac

                            It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

                            Comment


                              #15
                              Re: Mess display incorrect sequence

                              From wihtin Alpha Five use "Drop" the table to remove it from the database dictionaries. This will not remove the table or its dictionaries from the disk.

                              From within Alpha Five use "Delete" the table to remove the table and its dictionaries from the database dictionaries and delete it from the disk.

                              Comment

                              Working...
                              X