Alpha Video Training
Results 1 to 7 of 7

Thread: "Invalid key length"

  1. #1
    Member
    Real Name
    Toni McConnel
    Join Date
    Jan 2003
    Posts
    62

    Default "Invalid key length"

    In the OnChange event for SearchBy box for embedded browse, there is this line of code which I copied exactly from AlphaSports:

    tbl.order(searchby.text,searchby.text + " <> \"\"")

    However, when I open the browse I get an error message referring to this line of code and saying "Invalid key length". I have no idea what it is referring to, and a search of documentation didn't come up with anything I could recognize as pertinent. I don't know where to look.

    Also, and perhaps related, after many struggles I got the display field right in the browse and I can now select field from SearchBy box and the column titles in the browse will change accordingly BUT they all contain data from the title field, not the field that shows in the column heading.

    I have checked code carefully and it is identical with that in AlphaSports except of course my fields are different and I changed 'Lastname' in the AS code to 'Title' in my code, so I can't see where I've gone wrong.

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

    Default Re: "Invalid key length"

    Shouldn't be too hard to untangle. How about posting a zipped copy of the app here so we can take a look?

  3. #3
    Member
    Real Name
    Toni McConnel
    Join Date
    Jan 2003
    Posts
    62

    Default Re: "Invalid key length"

    Quote Originally Posted by Tom Cone Jr View Post
    Shouldn't be too hard to untangle. How about posting a zipped copy of the app here so we can take a look?
    I just barely started this project so it is not an application yet. I have created only one page based on the customer info form in AlphaSports. I tried to zip just the adb files but Winzip apparently won't zip those files. What do you suggest? Do you want me to go ahead and convert to an application? I'm such a novice I don't even know how to do that yet but now's a good time to learn! 8-)

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

    Default Re: "Invalid key length"

    Toni, you mention creating a "page". Are you working with the web app server or is this a desktop application? If it's the former you've posted to the wrong forum. This forum is for desktop, not web based, applications.

    OTOH, if you're working with a desktop application, then zip everything. The tables, the indexes, all the files in your database folder. Not including of course your alpha five program files, which hopefully are located somewhere else.

  5. #5
    Member
    Real Name
    Toni McConnel
    Join Date
    Jan 2003
    Posts
    62

    Default Re: "Invalid key length"

    Hi, Tom....
    It's a desktop application. Here's the folder, all my project files are in it, no Alpha Five program files. There's not much in it yet, just the one table, Books, and the one form that's giving me fits. I said 'page' but I meant 'form'.

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

    Default Re: "Invalid key length"

    Hello, Toni.

    I took a look. Dont' see an embedded browse, or a SearchBy box. What am I missing?

    Later on...

    I added an embedded browse and the missing combo box to the only form in the database. The onChange script is running fine, after a small amount of tweaking to adapt it to your table.

    The technique used to filter and sort the records in your table cannot be used with memo field data, so I've omitted your description and notes fields from the drop down choice list. I also omitted the logical fields. The logicals could be added to the list but would require modification of the onChange code to accommodate the different data type.

    Unzip the attachment in a new (empty) folder.

    -- tom
    Last edited by Tom Cone Jr; 08-19-2008 at 02:10 PM.

  7. #7
    Member
    Real Name
    Toni McConnel
    Join Date
    Jan 2003
    Posts
    62

    Default Re: "Invalid key length"

    Quote Originally Posted by Tom Cone Jr View Post
    Hello, Toni.

    I took a look. Dont' see an embedded browse, or a SearchBy box. What am I missing?

    Later on...

    I added an embedded browse and the missing combo box to the only form in the database. The onChange script is running fine, after a small amount of tweaking to adapt it to your table.

    The technique used to filter and sort the records in your table cannot be used with memo field data, so I've omitted your description and notes fields from the drop down choice list. I also omitted the logical fields. The logicals could be added to the list but would require modification of the onChange code to accommodate the different data type.

    Unzip the attachment in a new (empty) folder.

    -- tom
    Many thanks, Tom! When I saw your first message about the form with no browse and no SearchBy box, I went to my folder and I can't even open the form! The only thing I can think of is that in the process of zipping the folder the files got damaged. Hard to accept, though, because of course WinZip is a solid, reliable utility and I never had that happen before. So it's a mystery.

    I never intended to include the memo fields and logical fields in the browse but hadn't figured out yet how to not include them or to remove them once there. (I TOLD you I'm a novice! 8-] )

    I'll look closely at your version and see if I can figure out what it is I did wrong. Too bad the files I sent you got truncated because I think I would have learned a lot from your analysis.

    Regardless, I appreciate your help a LOT...without it I'm sure I'd be stuck for quite a while, because I tried really hard to figure it out before calling for help. I know you'll agree that learning to find and correct your own mistakes is the most solid way to learn.

    I'll be back if I have unresolved questions. Thanks again,

    Toni

Similar Threads

  1. invalid key length
    By Peter.Greulich in forum Alpha Five Version 5
    Replies: 14
    Last Post: 09-14-2003, 08:06 AM
  2. error message"invalid key length"
    By aaron nash in forum Alpha Five Version 5
    Replies: 2
    Last Post: 05-31-2003, 04:32 PM
  3. Invalid key length
    By Bill in forum Alpha Five Version 4
    Replies: 3
    Last Post: 04-12-2001, 06:54 AM
  4. Invalid Key Length
    By fairviewcomputing in forum Alpha Five Version 4
    Replies: 8
    Last Post: 03-17-2001, 04:11 PM
  5. "Unable to add key to tag" and "hea
    By Noble Bell in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-12-2000, 09:16 AM

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
  •