Announcement

Collapse
No announcement yet.

Snitz MySQL to VB MySQL Impex Import Errors

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

  • Snitz MySQL to VB MySQL Impex Import Errors

    I am getting errors when trying to import users to the vBulletin forum from Snitz 3.4.04. As you are probably aware, the error message spits out the SQL statement that failed.

    The Impex code is constructing a dynamic Insert SQL statement with a null string ('') for all of the columns of Integer datatype.

    If I replace the '' with NULL or 0 and run the query in the MySQL Query Tool, the statement executes fine, so it appears to definitely be a datatype issue.

    Why is the Impex code not defaulting Integer values to 0 or NULL instead of '' ?

    I am running MySQL 5.1 on both the snitz and vbulletin databases.

    Please help me !

  • #2
    SQL Statement

    ImpEx Database errormysql error: Invalid SQL:
    INSERT INTO vbulletin_user
    (
    username, email, usergroupid,
    importuserid, password, salt,
    passworddate, options, homepage,
    posts, joindate, icq,
    daysprune, aim, membergroupids,
    displaygroupid, styleid, parentemail,
    yahoo, showvbcode, usertitle,
    customtitle, lastvisit, lastactivity,
    lastpost, reputation, reputationlevelid,
    timezoneoffset, pmpopup, avatarid,
    avatarrevision, birthday, birthday_search, maxposts,
    startofweek, ipaddress, referrerid,
    languageid, msn, emailstamp,
    threadedmode, pmtotal, pmunread,
    autosubscribe, profilepicrevision
    )
    VALUES
    (
    'username',
    '[email protected]',
    '11',
    '1',
    '384267d9247923b486ca02aa2b0b2abb',
    '{l4',
    NOW(),
    '3159',
    'http://www.samplewebsite.com',
    '4030',
    '1058480835',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    'Forum Admin',
    0,
    '1135911989',
    '1135911989',
    '1135911989',
    '',
    '',
    '',
    '',
    '',
    '',
    '--',
    '--',
    '',
    '',
    '000.000.000.000',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    ''
    )

    mysql error: Incorrect integer value: '' for column 'daysprune' at row 1
    mysql error number: 1366
    Date: Thursday 05th 2006f January 2006 02:01:55 PM

    Comment


    • #3
      Most likely because MySQL is running in strict mode, if you run this SQL, what do you get ?

      SELECT @@sql_mode
      I wrote ImpEx.

      Blog | Me

      Comment


      • #4
        Thank you!

        I removed the strict option using the MySQL Administrator GUI.

        I have passed that hurdle and I will let you know if I encounter any more import errors.

        For the most part, I'm a .NET, SQL Server guy. This is my first MySQL project...does it show?

        I appreciate the prompt help.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X