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
Rodolfo VegasSubject: Possible bug: Problem with automatically created URL argument for collection function in Stylus Studio 2008
Author: Rodolfo Vegas
Date: 15 Jan 2008 07:42 AM
In Stylus Studio 2008, when I drag a table from a SQL Server datasource into the XQuery editor, it generates a collection function with the following format:

collection("\\server_port:DATABASE.object_owner.TABLE")

(the underscore "_" between the server and port strings is automatically generated, replacing the ":" character that is used in the corresponding "Connection settings" window)

When I execute the query, it gives the error message:

"Collection URI "\\server_port:DATABASE.object_owner.TABLE") is not valid"

I've tested the same in Stylus Studio 2007 and it generates it without the server and port information (as is displayed in the video tutorials):

collection("DATABASE.object_owner.TABLE")

This works fine in Stylus Studio 2007; I manually deleted the server and port information in the code generated in Stylus Studio 2008 and it also worked as expected.

Is this a bug of Stylus Studio 2008 or is there some 'option' to get the XQuery editor not to include this information in the URL string?

It's somewhat annoying to have to manually cut that information everytime I add a table dragging it into the editor.

Thanks in advance,
Rodolfo

Postnext
Ivan PedruzziSubject: Possible bug: Problem with automatically created URL argument for collection function in Stylus Studio 2008
Author: Ivan Pedruzzi
Date: 15 Jan 2008 03:49 PM
Hi Rodolfo,

The problem seems to be related to the prefix \\.

Does the following works?
collection("server_port:DATABASE.object_owner.TABLE")

Could you please show us the server URL you are drag and dropping from File Explorer?

Ivan Pedruzzi
Stylus Studio Team

Postnext
Rodolfo VegasSubject: Possible bug: Problem with automatically created URL argument for collection function in Stylus Studio 2008
Author: Rodolfo Vegas
Date: 16 Jan 2008 04:14 AM
Hi Ivan,

The code, as it's generated when I drag and drop the table onto the XQuery editor, is as follows (I mispelled it in my first message, typing the two backwards-slashes "\\", but they really are not included neither in the collection() argument nor in the error message, sorry for that):

collection("sql_inf_int.ebiosphere.com_1443:GRUPO_EUR.dbo.OFICINAS")/OFICINAS

The error message displays as follows:

[DataDirect][XQuery][err:FODC0004]Collection URI "sql_inf_int.ebiosphere.com_1443:GRUPO_EUR.dbo.OFICINAS" is not valid.

As I already stated in my first message, if I cut out the server and port information it works:

collection("GRUPO_EUR.dbo.OFICINAS")/OFICINAS

I hope this information will help. If you need any more info, let me know.

Thanks for your support.
Regards,
Rodolfo

Postnext
Ivan PedruzziSubject: Possible bug: Problem with automatically created URL argument for collection function in Stylus Studio 2008
Author: Ivan Pedruzzi
Date: 16 Jan 2008 10:50 AM


The problem is presence of character "." in the server name that can be escaped as

collection("sql_inf_int\.ebiosphere\.com_1443:GRUPO_EUR.dbo.OFICINAS")/OFICINAS

In the next Stylus Studio update "." will be replaced with "_".

If you are wondering why now Stylus Studio adds a symbolic connection name before the table identifier here is the reason:

If you try to write a query to access two servers with the same table names you will get a run-time error because the xquery engine doesn't know which one you want. Providing a symbolic connection name prevents the ambiguity.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
Rodolfo VegasSubject: Possible bug: Problem with automatically created URL argument for collection function in Stylus Studio 2008
Author: Rodolfo Vegas
Date: 16 Jan 2008 11:48 AM
I've successfully executed the query with the "\." charaters.

If I can make a suggestion for the update, I think it would be useful to have each defined connection named with some kind of 'alias' as you can do when registering MS Sql Servers on a client machine.

This alias would be of much more clarity for the user when seeing it in the File Explorer window and also could serve to avoid such long strings and to restrict the set of characters being used (not allowing spaces, periods, and similar).

For example, in my case:

"xdbc:xquery:sqlserver:SQL_INF_INT"

instead of

"xdbc:xquery:sqlserver:sql_inf_int.ebiosphere.com_1443"

Thanks and rgds,
Rodolfo

 
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.