Alpha Video Training
Results 1 to 17 of 17

Thread: "Expected Value" error when attempting to create a set

  1. #1
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default "Expected Value" error when attempting to create a set

    I'm a newbie to Alpha Five (not a newbie to database creation) so maybe missing something simple, but I have been unable to create a set with tables that I've created or imported. Every time I try to create a new set, I select a table in my database that I want to be the primary table for the set, then as soon as I hit the OK button an "expected value" error dialog shows up. That's it - no more information.

    The funny thing is that I can create a new set when I'm using the AlphaSports database.

    Help is appreciated.

  2. #2
    "Certified" Alphaholic
    Real Name
    Ohlen Cartmell
    Join Date
    Apr 2000
    Posts
    1,599

    Default

    This sounds like your table contains a formula for a calculated field that won't evaluate properly. Can you open the default form for the table?

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Field names?

    Quote Originally Posted by Alexjs1
    I'm a newbie to Alpha Five (not a newbie to database creation) so maybe missing something simple, but I have been unable to create a set with tables that I've created or imported. Every time I try to create a new set, I select a table in my database that I want to be the primary table for the set, then as soon as I hit the OK button an "expected value" error dialog shows up. That's it - no more information.

    The funny thing is that I can create a new set when I'm using the AlphaSports database.

    Help is appreciated.
    From the part about imported tables I would suspect field naming problems. Do your field names conform to Basic_Concepts_and_Terminology.htm

  4. #4
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default Thanks, but....

    Quote Originally Posted by Stan Mathews
    From the part about imported tables I would suspect field naming problems. Do your field names conform to Basic_Concepts_and_Terminology.htm
    Sorry, no formulas or calculated fields, and no irregular field names (all letters and underscores). Is there anything one must do when setting up field rules, particularly for the primary key (I've just been using a number field and setting up auto-increment)?

    Thanks!

  5. #5
    VAR Dan Blank's Avatar
    Real Name
    Dan Blank
    Join Date
    Apr 2000
    Location
    Fort Worth, TX
    Posts
    995

    Default

    Can you create a new table from scratch and then start to make a set from the newly created table? If you can, then I would suspect your primary table that is giving you the problem is corrupted. You can try packing the table, but my guess is you will need to create a new table from scratch, and then try to append the records.

    Just a thought.
    Dan

    Dan Blank builds Databases
    Skype: danblank

  6. #6
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default

    Quote Originally Posted by Dan Blank
    Can you create a new table from scratch and then start to make a set from the newly created table? If you can, then I would suspect your primary table that is giving you the problem is corrupted. You can try packing the table, but my guess is you will need to create a new table from scratch, and then try to append the records.

    Just a thought.
    I've attempted to create several tables, none of which could be made into a set. I even created a new database and then tried again with no success. I assume that having data in the tables is not necessary for a set, or am I mistaken?

  7. #7
    VAR Dan Blank's Avatar
    Real Name
    Dan Blank
    Join Date
    Apr 2000
    Location
    Fort Worth, TX
    Posts
    995

    Default

    You are correct. It is not necessary to have data in the tables when creating sets.

    I don't know what to tell you. My only suggestion would be to try re-installing Alpha Five.
    Dan

    Dan Blank builds Databases
    Skype: danblank

  8. #8
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,620

    Default how about a detailed example of what you are trying to do

    If you zip the directory with your files and post it here, we might see something that is causing your problem.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  9. #9
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default Here it is

    My bet is that you'll be able to create a set without a problem even though I could not. As you can see, this is about as simple as a database can get. The only attributes I changed were to make the respective primary keys auto-increment. BTW, I have re-installed the software with no success.

    Any known problems with XP SP2?

    Thanks!

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default

    "respective primary keys auto-increment" ????

    This is needed in the primary table only. To do this in the linked child table is unnecessary and will break the link between parent and child.

    -- tom

  11. #11
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,620

    Default Good Catch

    Alex

    Not much gets by Tom.....

    Does that get you on the right track?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  12. #12
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default

    Quote Originally Posted by Tom Cone Jr
    "respective primary keys auto-increment" ????

    This is needed in the primary table only. To do this in the linked child table is unnecessary and will break the link between parent and child.

    -- tom
    Tom,

    I tried removing auto-increment from what would be the child table with no luck, then I removed it from the other one - still no success. On another note, last I checked every table needs a primary key and it's usually best to use a key field that auto-increments. This shouldn't have any impact on the relationship between two tables. Is there something in Alpha Five that is different from most RDBMS's?

    Thanks,

    Alex

  13. #13
    VAR Dan Blank's Avatar
    Real Name
    Dan Blank
    Join Date
    Apr 2000
    Location
    Fort Worth, TX
    Posts
    995

    Default

    If I am reading and understanding your problem (and I probably am not). You are going to the control panel, under tables, selecting create a new set, get the list of tables, selecting a table to be the parent, and the Okay button becomes active, you click the Okay button, but you get an error and can not go any further. Is this correct?
    Dan

    Dan Blank builds Databases
    Skype: danblank

  14. #14
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Getting started

    Quote Originally Posted by Alexjs1
    Tom,

    Is there something in Alpha Five that is different from most RDBMS's?

    Thanks,

    Alex
    Alex,

    Let me try to explain why I recommended removing the autoincrement field rule in the child table. In a set based data entry form when you enter a new child table record Alpha Five will supply the necessary link field value to the new child table record automatically. You can see this in action by opening any of the sets in AlphaSports using the default form for the set. (Right click the set, choose the default form view.) The default form does not even include a field object for the child table link field. Yet when the child table is examined independently (after entering a record through the set based form) you'll see that the link field is not empty, but in fact now contains the correct link field value. If you want to include a field in the child table that will be used to link to a grandchild table, then (as pertains to the grandchild table) that field could be populated using autoincrement field rule, just don't use the same field to link to the first parent table, ok?

    Now, having said all that I've taken a look at your tables and the field rules and indexes. I recommend you delete the "unique records" filter you have placed on the link field indexes. If you think this is how one assures that duplicate primary keys will be blocked, this is understandable, but incorrect. Unlike other RDBMS with which you may have more experience in Alpha Five a "unique" index does not restrict data entry at all. Duplicate keys are permitted. If duplicate keys are present then the "unique" index causes Alpha Five to show only one. The "Unique" setting for Alpha Five indexes is useful at report time, but does not prevent the entry of records with duplicate primary keys. Check the help files for further details on what "unique" means in this context.

    Once you've changed the indexes to "All", instead of "unique", I recommend you define a simple expression as the default field value for the primary key in the table you want to be parent in your set. This is done using the data entry tab in field rules. (scroll down a bit to see it). This will cause Alpha Five to insert a default field value when a record is begun or saved (depending on how you define it; I recommend you select insert at start of data entry). This is how one seeds the autoincrement field in a table that is empty, like yours. The default field value is inserted, then saved with the record. When the second record is entered previous field value is automatically incremented, the default is not used because the field is populated by the autoinc field rule.

    I hope this helps get you going. It's far easier to do these things than it is to describe them in narrative text. Hope I haven't left anything out.

    --tom
    Last edited by Tom Cone Jr; 12-04-2005 at 05:20 AM.

  15. #15
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,620

    Default

    Quote Originally Posted by Alexjs1
    Tom,

    I tried removing auto-increment from what would be the child table with no luck, then I removed it from the other one - still no success. On another note, last I checked every table needs a primary key and it's usually best to use a key field that auto-increments. This shouldn't have any impact on the relationship between two tables. Is there something in Alpha Five that is different from most RDBMS's?

    Thanks,

    Alex
    Yes, you should have a unique index on each record, but that is not the field that the linkage between a parent and component should be based on.

    ie, a customer and an invoice should each have an id that allows you to find them individually. But to link the customer to all if its invoices, the invoice table needs to contain the customer number. Then you can build a set where the customer is the parent and the invoice is the child has a link on the common field customer_id.

    In your case, with name and position, you may need a third table that shows 'current_assignments' where the employee and the job are tied together. Parent - current_assignment: children 1-1 to name and position.
    In fact I do that in a current system showing exactly that relationship.

    I would suggest for clarity sake that you use id names like name_id, position_id, current_assignment_id to keep it straight. But you can use the same name, I just find it not as self-documenting.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  16. #16
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default Same results....

    Quote Originally Posted by Tom Cone Jr
    It's far easier to do these things than it is to describe them in narrative text. Hope I haven't left anything out.

    --tom
    Tom,

    Actually, you did an excellent job in your narrative - thanks. Alas, even with your changes I still have the same problem. BTW, the unique filter on my link field indexes was done automatically by Alpha Five, not by me.

    I'm going to try the old standby - installing it on another PC and see if I still have problems. Otherwise, I'm stumped.

  17. #17
    Member
    Real Name
    Alex Salop
    Join Date
    Dec 2005
    Posts
    10

    Default

    Quote Originally Posted by Al Buchholz
    Yes, you should have a unique index on each record, but that is not the field that the linkage between a parent and component should be based on.
    Yes, I agree. I did this one up quickly to demonstrate the problem I was having. I don't plan to use these tables for anything.

    Thanks,

    Alex

Similar Threads

  1. How to create a "remarks" box in a form?
    By mgbeecher in forum Alpha Five Version 6
    Replies: 9
    Last Post: 03-24-2006, 06:10 PM
  2. Entering new records in set in "form manner" not in browse
    By Robert Rough in forum Alpha Five Version 6
    Replies: 8
    Last Post: 10-05-2005, 04:56 AM
  3. how do I create a large "IF" statement?
    By Angie Boutin in forum Alpha Five Version 5
    Replies: 11
    Last Post: 09-12-2003, 09:24 PM
  4. ERROR "expected value"
    By Steve Foster in forum Alpha Five Version 5
    Replies: 2
    Last Post: 08-23-2003, 06:21 AM
  5. Automate "Create Install Package"
    By dparkins in forum Alpha Five Version 5
    Replies: 1
    Last Post: 08-11-2003, 04:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •