Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Can't get going

Quote Reply
Can't get going
I hope this is the last hurdle I have to pass before I can start enjoying the decision to buy Links SQL. The problem is, that I can't add category, and I'm stuck finding the bug that prevents the success.
I'm able to add user and log on as one. So far so good. When I try to add category from admin.cgi, I get the following error:
GT::SQL::Driver::ODBC::sth (1548): Executing query: SELECT ID FROM lsql_Category WHERE FatherID = 0 AND Name = 'Medier' from Links::Category::can_add at d:\www2\asp.stiften\cgi-bin\links/admin/Links/Category.pm line 101

GT::SQL::Driver::ODBC::sth (1548): Executing query: INSERT INTO lsql_Category (Description,Newest_Link,Category_Template,Timestmp,Meta_Description,Name,Footer,Header,Has_New_Links,Number_of_Links,Has_Changed_Links,Full_Name,Meta_Keywords,FatherID) VALUES ('Østjyske onlinemedier, danske og udenlandske','','av','2003-03-04','Østjyske onlinemedier, danske og udenlandske','Medier','footer.txt','header.txt','No',0,'No','Medier','Østjyske onlinemedier, danske og udenlandske',0) from Links::Category::_plg_add at d:\www2\asp.stiften\cgi-bin\links/admin/Links/Category.pm line 54

GT::SQL::Table (1548): Failed to execute query: 'INSERT INTO lsql_Category (Description,Newest_Link,Category_Template,Timestmp,Meta_Description,Name,Footer,Header,Has_New_Links,Number_of_Links,Has_Changed_Links,Full_Name,Meta_Keywords,FatherID) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)' Reason: [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification (SQL-22018)(DBD: st_execute/SQLExecute err=-1) at d:\www2\asp.stiften\cgi-bin\links/admin/GT/SQL/Driver/ODBC.pm line 419. GT::SQL::Driver::ODBC::sth (1548): Executing query: SELECT DISTINCT Full_Name, ID FROM lsql_Category from Links::Category::HTML::disp_fatherid_form at d:\www2\asp.stiften\cgi-bin\links/admin/Links/Category.pm line 590

I made a Google-search to find an explanation to SQL-22018, which gave several results, but the "common denominator" is: "Invalid character value for cast specification (SQL-22018): StatementText contained an SQL statement that contained a literal or parameter and the value was incompatible with the data type of the associated table column."

What I don't get, is, how there can be a kind of a data type mismatch, when Isql_Category is created by setup.cgi and I have no suspicion of bugs in the table. Therefore my primary suspect is the configuration of the database server. Are there any parameters there who could cause a "type mismatch"? How about the ANSI_NULLS, paddings or warnings set?

Could it have anything to do with different ways of displaying dates. I have changed date_db_format to %dd%-%mm%-%yyyy%, which is the "danish way" of displaying dates, and I have changed $DATE_FMT to "%dd% %mm% %yyyy% %HH%:%MM%:%ss%", which is the way timestamps appear on the server. Despite the latter change, the date in above query doesn't fit that format. Where can I change the format in order to make it appear differently in the query? I'm just shooting blind from the hip here, because I can't see any obvious solution to my problem.

Hope somebody can give me a clue.

Below there is a screendump showing the properties of lsql_Category as seen from "Enterprise Manager". Perhaps there is something obviously wrong there, but beyond the limits of my knowledge.


Last edited by:

helgi: Mar 4, 2003, 2:25 PM
Quote Reply
Re: [helgi] Can't get going In reply to

Sorry about the troubles! Activestate recently put out a new vesrion of DBD::ODBC package that breaks with Links SQL. We are currently testing Links SQL with the latest version to make sure it's fully compatible and will be putting out an update shortly.

Can you email support-lsql@gossamer-threads.com, and we can send you a new GT/SQL/Driver/ODBC.pm file that should fix the problems.


Gossamer Threads Inc.
Quote Reply
Re: [Alex] Can't get going (Case closed) In reply to
Just in order to close this thread properly, I'd like to thank you, Alex, for the updated ODBC.pm, it solved the problem. Everything runs perfectly now.