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

start up form error

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

    start up form error

    Hi all,

    small problem you may be able to help with.

    I have v9 developement that this works perfectly with in a oninit event for a startup form. It also works with v7 developement and runtime. It does NOT work with v9 runtime.

    the error comes when the script getsto ix=t.query_create() . It says field does not exist.

    Code:
    t=table.open("slspeeps",file_ro_shared) 
    query.filter="username="+quote(trim(scode))
    query.order="" 
    query.options="T" 
    ix=t.query_create() ' ix is not dimmed anywhere
     if ix.records_get()=0 then 
      a5.close() 
     end if 
    username=t.username 
    salesman=t.salesname 
    cellphone = t.cellphone 
    password = t.password 
    usernow = t.usernow
    permissions = t.permissions
    userlot = t.lot
    gotoileads = t.gotoileads
    gotosales = t.gotosales
    gotoother = t.gotoother
    gotoreports = t.gotoreports
    gotocsi = t.gotocsi
    buycar = t.buycar
    gotoslsschedule = t.gotoslsschedule
    gotoslslabels = t.gotoslslabels
    setupemail = t.setupemail
    seedealnumbers = t.seedealnumbers
    reshadow = t.reshadow
    gotocomp = t.gotocomp
    cleantbls = t.cleantbls
    gotoinv=t.gotoinv
    editletters=t.Editletters
    gotoslspeople = t.gotoslspeople
    editownpassword = t.editownpassword
    editownuserinfo=t.editownuserinfo
    seeallslspeople=t.seeallslspeople
    editpermiss=t.editpermiss
    gotovendors=t.gotovendors
    gotobanks=t.gotobanks
    I have dimmed the ix as a P to no avail.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    #2
    Re: start up form error

    Hi Dave. Tell us about "username" and "scode". What are they? Where are they initialized? What values would typically be present when the script runs?

    I personally avoid overloading the OnInit event for forms. Prefer to load the form but keep it hidden. Set field values as needed. Set controlling index or query. Then when everything is set, I show the form to the user. It's a mistake to think the form stops opening while the OnInit runs.

    -- tom

    Comment


      #3
      Re: start up form error

      Thanks for looking Tom.

      username is a c variable and scode is a field in a table

      the oninit is really pretty short compared to what I have used it the past.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: start up form error

        Originally posted by DaveM View Post
        username is a c variable and scode is a field in a table
        Then I think you have the filter backwards...

        query.filter="username="+quote(trim(scode))

        would be

        query.filter="scode="+quote(trim(username))
        There can be only one.

        Comment


          #5
          Re: start up form error

          Hi Stan,

          I also reported it as a bug. Selwyn says it can't happen.

          I will try your suggestion today and also the one Selwyn gave me as follows.

          Code:
          i would suggest that before you to t.query_create(), you add this line to your script:
          
          showvar(t.field_name_get() + crlf(3) + "filter: " + query.filter)
          
          this will give you a list of fields in the table and you can confirm for yourself if all of the fields in your filter exression are indeed in the table.
          .
          Dave Mason
          [email protected]
          Skype is dave.mason46

          Comment


            #6
            Re: start up form error

            Stan,

            That did not work with the developement or the runtime. I then had the same error on each. When I changed it back, the error went away on the developement program, but persists on the runtime.

            What Selwyn gave me was no help either.

            .
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


              #7
              Re: start up form error

              If my suggestion didn't work then you had it backwards when you said

              username is a c variable and scode is a field in a table
              In the interactive type (paste from here)

              t=table.open("slspeeps",file_ro_shared)
              ? t.username
              'see the result here
              'then
              t.close()

              That will tell you if the field is in the table where you want to use it in the query.filter.
              There can be only one.

              Comment


                #8
                Re: start up form error

                Stan,

                With reversing as you suggested and then reversing back to the way it was, I can now oppen the server files without an error. It will not work on the shadow. I have deleted the shadow dbf files and did the shadow over again to no avail.

                All help is appreciated too!! and yes the username is a field and scode is a variable. I told you wrong. The fields show up in the shadowed table when viewed in a browse.

                Here is what I have now:
                Code:
                'dim ix as P
                t=table.open("slspeeps",file_ro_shared) 
                'query.filter="scode="+quote(trim(username)) ' I tried it this way per Stan and hd more errors
                query.filter="username="+quote(trim(scode)) ' it has worked this way for several years
                query.order="" 
                query.options="T" 
                'showvar(t.field_name_get() + crlf(3) + "filter: " + query.filter)
                ix=t.query_create() 
                 if ix.records_get()=0 then 
                  a5.close() 
                 end if 
                username=t.username 
                salesman=t.salesname 
                cellphone = t.cellphone 
                password = t.password 
                usernow = t.usernow
                permissions = t.permissions
                userlot = t.lot
                gotoileads = t.gotoileads
                gotosales = t.gotosales
                gotoother = t.gotoother
                gotoreports = t.gotoreports
                gotocsi = t.gotocsi
                buycar = t.buycar
                gotoslsschedule = t.gotoslsschedule
                gotoslslabels = t.gotoslslabels
                setupemail = t.setupemail
                seedealnumbers = t.seedealnumbers
                reshadow = t.reshadow
                gotocomp = t.gotocomp
                cleantbls = t.cleantbls
                gotoinv=t.gotoinv
                editletters=t.Editletters
                gotoslspeople = t.gotoslspeople
                editownpassword = t.editownpassword
                editownuserinfo=t.editownuserinfo
                seeallslspeople=t.seeallslspeople
                editpermiss=t.editpermiss
                gotovendors=t.gotovendors
                gotobanks=t.gotobanks
                gotoagents=t.gotoagents
                gotorebates=t.gotorebates
                deletesales=t.deletesales
                makebackup=t.makebackup
                editcompinfo=t.editcompinfo
                advertisers=t.advertisers
                t.close()
                if alltrim(pword)<>alltrim(password) then
                 UI_MSG_BOX("User","Your User name or Password is incorrect. UpsLog will now close",UI_OK)
                 sleep(3)
                 a5.close() 
                end if
                Dave Mason
                [email protected]
                Skype is dave.mason46

                Comment


                  #9
                  Re: start up form error

                  Any reason all this heavy lifting couldn't be off loaded to the autoexec script?

                  Is the table that's opened by the script also a table that supports the startup form?

                  Look for ways to lighten the load placed on the OnInit event.

                  Comment


                    #10
                    Re: start up form error

                    Hi Tom,

                    I offloaded to autoexec and a function and another script. tried to break it up good. not much left in the oninit.

                    It is still the same. It works in the server folder, but not the shadow folder.

                    I opened the shadow and tried a database compact and got over 100 errors. This is not good. it was mostly to do with field rules.

                    It does not give the errors in the server folder.

                    I have restarted v9 many times and so to, the computer.

                    Dave
                    Dave Mason
                    [email protected]
                    Skype is dave.mason46

                    Comment


                      #11
                      Re: start up form error

                      It works in the server folder, but not the shadow folder.

                      I opened the shadow and tried a database compact and got over 100 errors.
                      I take this to mean that the shadow differs from the live database.

                      Have you examined the creation of the shadow to make sure it is being created where you mean it to be and that when you open the shadow you are opening the right one?
                      There can be only one.

                      Comment


                        #12
                        Re: start up form error

                        Tom, Stan,

                        I could not think of 2 smarter people here.

                        The folders differ of course. one is named ups55s, the other is ups559(s being for server files.

                        I copied the whole server contents into the shadow folder after emptying it. I could start the app fine. Rather than make a mess, I then created the shadow right over the top of the server file already in the shadow folder. I got the same problem on starting the shadow.

                        I am somewhat baffled. It seems to me the making of the shadow is corrupting files. I have copied all the supporting files over to the shadow(no dbf) and still get the problems.



                        .
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment


                          #13
                          Re: start up form error

                          Dave, suggest you delete the shadow folder. Then let Alpha Five create the shadow for you by network optimizing the work station.

                          You don't by chance have portions of your application spread across multiple folders or subfolders do you?

                          Comment


                            #14
                            Re: start up form error

                            Tom,

                            Deleted everything. started over and no, Everything is in one folder.

                            I also downloaded the most recent patch and installed it even though it is the same version.

                            dave
                            Dave Mason
                            [email protected]
                            Skype is dave.mason46

                            Comment


                              #15
                              Re: start up form error

                              Tom, Stan,

                              Thanks a bunch for helping me with this.

                              I deleted the folder, made another folder with a new name, used the developement prog to make the shadow and then inserted the runtime into that folder.

                              It works great now and the changes i made at Tom's bequest seems to have helped the speed greatly.

                              THANKS!!!


                              .
                              Dave Mason
                              [email protected]
                              Skype is dave.mason46

                              Comment

                              Working...
                              X