#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Washington, DC
    Posts
    12
    Rep Power
    0
    Hey guys I hope you can help me with this one... I'm trying to create a table from an old msql db dump. I think I've converted all the commands to be mysql compliant but when I try to build my indexes the thing gives me the following error message:
    Specified key was too long. Max key length is 256. I hope you guys can help! =)
    Here is the code I'm using:

    CREATE TABLE manetwork (
    listing INT NOT NULL,
    name TEXT,
    email TEXT,
    city CHAR(50),
    region CHAR(25) NOT NULL,
    state CHAR(4) NOT NULL,
    country CHAR(40),
    age INT,
    kstyle CHAR(75) NOT NULL,
    style CHAR(150) NOT NULL,
    INDEX manetwork_search (
    listing,
    region,
    state,
    kstyle,
    style
    ),
    UNIQUE INDEX manetwork_listing (
    listing
    )
    ) g

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    32
    Rep Power
    15
    Your "manetwork_search" index is too big. The "kstyle" and "style" are taking up too much space. Chop 'em off at a certain length, 25 for example...

    INDEX manetwork_search (
    listing,
    region,
    state,
    kstyle(25),
    style(25)
    )
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Washington, DC
    Posts
    12
    Rep Power
    0
    Thanks! That did the trick. (and made me smack my forehead) Gotta love devshed. =)

Similar Threads

  1. Launching bat files serially in VB6?
    By sstringer in forum Visual Basic Programming
    Replies: 13
    Last Post: March 8th, 2004, 02:37 AM
  2. kernel32.dll etc info on functions ?
    By Mozo_Grand in forum Visual Basic Programming
    Replies: 17
    Last Post: August 28th, 2003, 03:55 PM
  3. Length of sql statement - too long?
    By MiniMe in forum MySQL Help
    Replies: 1
    Last Post: June 10th, 2003, 08:15 AM
  4. enumerate Win32 processes from VB
    By X-2-X in forum Visual Basic Programming
    Replies: 1
    Last Post: April 13th, 2003, 04:56 PM
  5. Overcoming Max SQL string length?
    By PeteX in forum MySQL Help
    Replies: 3
    Last Post: October 28th, 2001, 09:55 AM

IMN logo majestic logo threadwatch logo seochat tools logo