XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
guy-francis vellaSubject: [SQLServer JDBC Driver]Value can not be converted to requested type.
Author: guy-francis vella
Date: 09 May 2009 04:15 AM
Evening All

I created an xquery to extract code (see attached) from a ledger (in an sql db) for importation via xml into a different system. The query worked fine and now i am looking to use the same query for another ledger (in the same sql db, but using some different tables).

The only differences are the name of the ledger specific tables and a few minor variations in column type (i.e. int rather than float) but nothing major. However I get the following error. I realise it likely to be something in the data, but i have no idea what and the full error (see attached) isn't helping me locate it.

I'm going to rewrite my code from scratch tomorrow, but was hoping someone might have come across something similar and have an idea why to be more specific in my troubleshooting.

ciao

guy


DocumentError.rtf
Xquery error

DocumentCONPAC_BIZv2.xquery
Xquery code

Postnext
guy-francis vellaSubject: [SQLServer JDBC Driver]Value can not be converted to requested type.
Author: guy-francis vella
Date: 09 May 2009 06:24 AM
Ok: I have narrowed the issue down to a specific field that we have updated from an int (it was a 0 or 1) to a varchar (it is now true or false).

There is nothing i can see to cause problems unless Stylus is caching the the old column type.

Postnext
guy-francis vellaSubject: [SQLServer JDBC Driver]Value can not be converted to requested type.
Author: guy-francis vella
Date: 10 May 2009 01:00 AM
Ok: If I create a new view (with exactly the same data as the view causing the issues) then this problem goes away. Somewhere MSSQL, Java or Stylus is caching the structure of the view as it was originally.

For now I can get round this by simply renaming all my views. However; another option would be nice for future reference, especially since there is every chance that i will be tweaking my data as I go along.

Tried rebooting SQL: No change
Tried rebooting locally: No change

Postnext
Ivan PedruzziSubject: [SQLServer JDBC Driver]Value can not be converted to requested type.
Author: Ivan Pedruzzi
Date: 11 May 2009 12:33 PM
Stylus Studio may cache the database metadata, but restarting the IDE should be more than enough to solve the problem.

Were you able to determine which statement was rising the error?


Thanks for your help
Ivan Pedruzzi
Stylus Studio Team

Posttop
guy-francis vellaSubject: [SQLServer JDBC Driver]Value can not be converted to requested type.
Author: guy-francis vella
Date: 12 May 2009 05:02 AM
Gudday Ivan.

Not sure what you mean by restarting the IDE, but this was the specific line causing the issue:

<IsSelfBilling>
{
$All_CONPAC_Businessv2_Data/IsSelfBilling/text()
}
</IsSelfBilling>

ciao

guy

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.