Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Getting Errors on Importing from Links2 to LinksSQL

Quote Reply
Getting Errors on Importing from Links2 to LinksSQL
I am getting error from importing my backup db (Links2) to (LinksSQL) ...
I've used this thread to remove ^M but with no success, as I do not see ^M in links.db or validate.db.
I also tried to ftp links.db to my local windows pc, then ftp it back in ascii mode, but the import is still complaining about ^M.
I've maually deleted ^M from categories.db and the file was successfully imported; however, with links.db the error (shown below) is coming up when I attempt to import it, and when I vi the file, I do not see the ^M... any suggestion...
Thanks much...
Mark

Code:


Importing Links ...
Import error: WARNING: Unable to insert link `marry' (SQL query: `INSERT INTO glinks_Links (ID, LinkOwner, isValidated, Add_Date, Mod_Date, Contact_Name, Contact_Email, Title, URL, Description, Hits, isNew, isPopular, Rating, Votes, Country, Graphic, Subscription, District, Gheight, Gwidth, Media Type, Frequency, City, Supports, Comment, Related to Media, Supports_4, Supports_5, Language_1, Language_2, Priority, Language_3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'): You have an error in your SQL syntax near 'Type, Frequency, City, Supports, Comment, Related to M' at line 1
Import error: WARNING: Unable to insert link `steve' (SQL query: `INSERT INTO glinks_Links (ID, LinkOwner, isValidated, Add_Date, Mod_Date, Contact_Name, Contact_Email, Title, URL, Description, Hits, isNew, isPopular, Rating, Votes, Country, Graphic, Subscription, District, Gheight, Gwidth, Media Type, Frequency, City, Supports, Comment, Related to Media, Supports_4, Supports_5, Language_1, Language_2, Priority, Language_3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'): You have an error in your SQL syntax near 'Type, Frequency, City, Supports, Comment, Related to M' at line 1
Import error: WARNING: Unable to insert link `laura' (SQL query: `INSERT INTO glinks_Links (ID, LinkOwner, isValidated, Add_Date, Mod_Date, Contact_Name, Contact_Email, Title, URL, Description, Hits, isNew, isPopular, Rating, Votes, Country, Graphic, Subscription, District, Gheight, Gwidth, Media Type, Frequency, City, Supports, Comment, Related to Media, Supports_4, Supports_5, Language_1, Language_2, Priority, Language_3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'): You have an error in your SQL syntax near 'Type, Frequency, City, Supports, Comment, Related to M' at line 1
Import error: WARNING: Unable to insert link `romio' (SQL query: `INSERT INTO glinks_Links (ID, LinkOwner, isValidated, Add_Date, Mod_Date, Contact_Name, Contact_Email, Title, URL, Description, Hits, isNew, isPopular, Rating, Votes, Country, Graphic, Subscription, District, Gheight, Gwidth, Media Type, Frequency, City, Supports, Comment, Related to Media, Supports_4, Supports_5, Language_1, Language_2, Priority, Language_3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'): You have an error in your SQL syntax near 'Type, Frequency, City, Supports, Comment, Related to M' at line 1
Import error: WARNING: Unable to insert link `nancy' (SQL query: `INSERT INTO glinks_Links (ID, LinkOwner, isValidated, Add_Date, Mod_Date, Contact_Name, Contact_Email, Title, URL, Description, Hits, isNew, isPopular, Rating, Votes, Country, Graphic, Subscription, District, Gheight, Gwidth, Media Type, Frequency, City, Supports, Comment, Related to Media, Supports_4, Supports_5, Language_1, Language_2, Priority, Language_3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'): You have an error in your SQL syntax near 'Type, Frequency, City, Supports, Comment, Related to M' at line 1
Quote Reply
Re: [Mark2] Getting Errors on Importing from Links2 to LinksSQL In reply to
Hi,

In your links.def file (in link 2), you need to change:

'Related to Media'

..to:

Related_to_Media

With spaces, its not a valid syntax - so its giving a fatal. I'm suprised GLinks doesn't convert spaces in field names to underscores.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Getting Errors on Importing from Links2 to LinksSQL In reply to
I am back again to fight with the import stuff...now able to import most of my links, but the numbers do not add up correctly ....
I am still getting still the following errors while importing links:
Code:

...
...
14000
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '1612-14354' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4025-14368' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4025-14369' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4436-14374' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '1681-14375' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4692-14376' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '1323-14383' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4000-14385' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '599-14400' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '3974-14401' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4642-14408' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '898-14422' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '3188-14465' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '1617-14477' for key 1
14500
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4604-14584' for key 1
Import error: WARNING: Unable to execute query `INSERT INTO glinks_CatLinks (LinkID, CategoryID) VALUES (?, ?)': Duplicate entry '4076-14586' for key 1
14605 records from 'Links' imported.

thank you again...
Mark
Quote Reply
Re: [Mark2] Getting Errors on Importing from Links2 to LinksSQL In reply to
Hi,

You may wanna contact GT about that. Looks like there is some issue with the primary key being duplicated or something. Not had a ton of experience importing from Links2 > GLinks, so I've only come across that problem once, and I can't remember how I sorted it - sorry.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!