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

Field and expression-type must match error

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

    Field and expression-type must match error

    I get Field and expression-type must match error when appending a table.
    Do the expressions inside the source table has to be identical to the posting/receiving table?
    Or just the name, type and size?

    #2
    Re: Field and expression-type must match error

    The master fields must be of the same type and sized at least as large as the source data.
    There can be only one.

    Comment


      #3
      Re: Field and expression-type must match error

      IN other wordsThe expression of the receiving table, does not matter?
      So why the error says expression do not match?
      The reason for asking is that I have 2 tables 120 of 209 fields are matched, in size, type and name.
      Yet it will not append.
      The difference is that the sending table does not have any expressions, the receiving table has many.
      Any suggestions?

      Comment


        #4
        Re: Field and expression-type must match error

        When you design any operation you are using a genie that Alpha supplies to generate the underlying xbasic code. For each field appended to Alpha create a pair of lines of code like

        append.m_field1 = "STORE"
        append.m_exp1 = "alltrim(str(@NEWIMPT->STORE))"
        the first line specifies the field in the master table being appended to
        the second line is the expression to put in the master table field

        In my example note that the expression to be appended to "STORE" converts the store field in the source table (newimpt) from numeric to character and trims any spaces.

        When the m_field1 data type and the m_exp1 data type don't match you get the error..........

        Field and expression-type must match error
        There can be only one.

        Comment


          #5
          Re: Field and expression-type must match error

          Ok, I have got a few ways to find the difference in tables and Dbs.
          I have a few ways to compare tables, yet when comparing tables of large amount of fields, is in simple terms, Hell.
          The problem is that comparing tables, the utilities compare the code inside each field and different names.
          The need I have is to match the field type and the size. In other words the comparison, shows fields that are not equal, when in reality, they are, for my objective.

          In small or medium size tables, these compare utilities are great and for other reasons, they are great too.
          The explanation above confirm the results I am getting. It does not matter the code inside the fields, just of course the name, the field type and the size.

          I have 3 possibilities:

          1 Is there a way to trap the error with the field that is not matching as we run the operation of appending and tell me the field mismatching?
          (I try the trace error, but either I did not know how to use it, or it does not work in this case.)
          2 A comparison utility to only compare fields with the same name in both tables that have different field type and size.
          3 Quit this work.

          I think 3 will be a disaster, So I would like to stick with 1 and 2

          Comment


            #6
            Re: Field and expression-type must match error

            My guess is that you have numeric fields in the source table that should be character fields in the master table? Why not just restructure the source table before appending.

            TABLE_RESTRUCTURE()


            You can get the information needed for the restructure command with <TBL>.FIELD_INFO_DUMP() .
            There can be only one.

            Comment


              #7
              Re: Field and expression-type must match error

              I just tried <TBL>.FIELD_INFO_DUMP() . this way:

              using it at the interactive window
              Step A:

              dim tbl as P
              tbl = table.open("customer")

              then this

              ? tbl.Field_Info_Dump("n,t,W,D") ( if I had the need of the field rules, just add ,R to the line, I did not need it now)

              It gave me the list that I needed.
              So in order to able to use this list, I copy the basic structure of the field list to excel.
              Did a data sort.

              Steb B
              Then I did repeat Step A with second table.
              Did the same to another excel sheet.
              sort it, place them side by side and slide them.

              The chances of seen the difference, were easier and more reliable, making it simpler and faster to find the different fields sizes and types.
              Still work, but 4 notches below hell.

              Thanks Stan.

              Table structure at this time will not help me as numbers may be with different decimals.

              I did peek at another section of tables in the wikiweb and found this link, a list of table commands. Great find.

              http://wiki.alphasoftware.com/Table+...ns+and+Methods

              Comment


                #8
                Re: Field and expression-type must match error

                Just a case of slogging it out now Mike.
                BTW I use A5Doc to check the Table Contents.
                Worth getting a copy for the amount of work it does.
                See our Hybrid Option here;
                https://hybridapps.example-software.com/


                Apologies to anyone I haven't managed to upset yet.
                You are held in a queue and I will get to you soon.

                Comment


                  #9
                  Re: Field and expression-type must match error

                  Excellent tool. A must get.

                  Thanks

                  Comment


                    #10
                    Re: Field and expression-type must match error

                    At last. It works!

                    Wrong post but I have 9 versions of the problem to play with now.
                    I'll put it in the correct place Mike.
                    Attached Files
                    See our Hybrid Option here;
                    https://hybridapps.example-software.com/


                    Apologies to anyone I haven't managed to upset yet.
                    You are held in a queue and I will get to you soon.

                    Comment


                      #11
                      Re: Field and expression-type must match error

                      Very good....!!!!

                      I see the data displayed very well. I have to implemented it in the system. I will let you know how good I am this.

                      Specially if I gain the speed. I will do that Wednesday, as I have to travel to Washington, today and tomorrow.



                      Thanks

                      Comment


                        #12
                        Re: Field and expression-type must match error

                        Have a good and safe trip.
                        Make a millon $!
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        Apologies to anyone I haven't managed to upset yet.
                        You are held in a queue and I will get to you soon.

                        Comment

                        Working...
                        X