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

Xbasic and Indices

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

    Xbasic and Indices

    The following line in my script file:

    tbl.index_primary_put("checkdate")

    keeps returning an error message of Tagname not found.


    Checkdate is the name of an index in the table that has been opened with this script file.


    The script is used to update a checkbook balance - checkdate is in ascending order.


    Any thoughts would be appreciated.


    JAS

    #2
    RE: Xbasic and Indices

    Are you sure checkdate is the tagname, not the index expression, assuming they are different?

    IOW you might have a tagname ckdte whose index definition is checkdate, ascending, all.
    There can be only one.

    Comment


      #3
      RE: Xbasic and Indices

      Stan:


      Checkdate is the Index Name.


      Have looked high and low for Tagname - no idea what it is referring to.


      I thought the value within the quotes of the script line


      tbl.index_primary_put("checkdate")


      was the Index Name. At least that's what the Xbasic manual leads me to believe.


      JAS

      Comment


        #4
        RE: Xbasic and Indices

        You are correct. Index name and tagname are the same thing. Index expression is where some might get confused. Like tables and databases in earlier incarnations of db software were the same thing. Properly an index is a file containing one or more tags (indexing components) and a tag is a name for the "expression, direction, include" definition.

        This is why I thought you might have mistakenly entered the field name on which the tag was based, i.e. having a field department, index (on that field) named dept, and using department as the "tagname" instead of "dept".

        Since you indicate that this is not the case, can you zip up your files and attach them for further study?
        There can be only one.

        Comment


          #5
          RE: Xbasic and Indices

          Stan:


          See attached - thanks for the assistance.


          JAS

          Comment


            #6
            RE: Xbasic and Indices

            On the "on exit" event of your Balance_form_1 form and your postpone button you use tbl.index_primary_put("date") not tbl.index_primary_put("checkdate") I think this is the cause of your error message.

            Comment


              #7
              RE: Xbasic and Indices

              Allen:


              It's probably one of many problems with this thing.


              However, I believe correcting this will not solve the problem with the script file, since it is acting directly on Ledger and does not invoke any forms.


              Anyway, thanks for the sharp eyes.


              JAS

              Comment


                #8
                RE: Xbasic and Indices

                Allen Klimeck wrote:
                -------------------------------
                On the "on exit" event of your Balance_form_1 form and your postpone button you use tbl.index_primary_put("date") not tbl.index_primary_put("checkdate") I think this is the cause of your error message.


                James A. Schott wrote:
                -------------------------------

                However, I believe correcting this will not solve the problem with the script file, since it is acting directly on Ledger and does not invoke any forms.


                As the only index you have is called "checkdate", the command tbl.index_primary_put("date") WILL cause the error message...

                Stephen Williams

                Comment


                  #9
                  RE: Xbasic and Indices

                  James,

                  I agree with Stephen. If you edit the scripts for the two events he notes, and use checkdate, the error disappears.

                  The script you have under the code tab is correct, but this code is not used as far as I can tell.

                  Stan
                  There can be only one.

                  Comment


                    #10
                    RE: Xbasic and Indices

                    Stan:


                    Fixed both the "on exit" and postpone script files, but I still get the same error when I try to manually run the Update Balance script file in the Code folder. Still lost on this one.


                    JAS

                    Comment


                      #11
                      RE: Xbasic and Indices

                      James,

                      I downloaded this again to my home machine, went to the control panel, code tab, right clicked "Update Balance", no errors. I did have to edit the table.open() to point to the location to which I installed it, but you wouldn't get to the error you are having if that wasn't correct on your machine.

                      Can't imagine why you're getting an error now.

                      Stan
                      There can be only one.

                      Comment


                        #12
                        RE: Xbasic and Indices

                        Stan:


                        Just to let you know, no luck so far.


                        Tried deleting the Checkdate index, then compacted the database.


                        Went into the interactive window, opened the Ledger table, and ran an index_name_get(0 and an index_name_get(1)

                        0 returned " "
                        1 returned "Date"


                        Wonder where this one is coming from?


                        JAS

                        Comment


                          #13
                          RE: Xbasic and Indices

                          Tried deleting the Checkdate index? Did you or did you not?


                          .index_name_get()
                          Syntax:
                          Tag Name = .index_name_get( Number)
                          Description:
                          Returns the tag name of the N th index tag in the production index for the table
                          referenced by the object pointer,

                          N th index, 0 (zer0) th index would be undefined, surprised you didn't get an error or crash.

                          1 (one) th (in your case only) index, since you compacted I would have supposed this would be undefined as well. This would probobly report undeleted queries as well as indexes. Have you checked by opening the ledger table, ctrl-I, Ctrl-K to see if there are any queries "available"?
                          There can be only one.

                          Comment


                            #14
                            RE: Xbasic and Indices

                            Stan:


                            Damned are you patient!!


                            Opened Ledger, did a find by key, the only search available is "".


                            Not tried - I did delete the Checkdate index.


                            Here's a copy from the interactive window:



                            tbl=table.open("c:alpha5v4checkbookledger")

                            indx = tbl.index_name_get(0)
                            ?indx
                            = ""

                            indx = tbl.index_name_get(1)
                            ?indx
                            = "Date"

                            indx = tbl.index_name_get(2)
                            ?indx
                            = ""

                            indx = tbl.index_name_get(3)
                            ?indx
                            = ""


                            Am definitely confused on this issue. I've seen discussions before where people have problems on their own PC but no one else can duplicate the problem. The one's having the problem end up completely rebuilding the database, which sometimes seems to solve the problem. Hard to believe in this day and age that some problems are machine specific.


                            For whatever it's worth, thanks for all the time and effort you have been expending. It's true what they say - this message board is worth it's weight in Microsoft stock.


                            JAS

                            Comment


                              #15
                              RE: Xbasic and Indices

                              I too, cannot duplicate your problem. I removed the reference in the OnExit event of Balance Form 1. Prior to removing, I got the error upon closing the form. Afterwards, nothing. It worked like a charm.

                              Tom Lyon

                              Comment

                              Working...
                              X