Subject: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:
(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.
Subject: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?
Subject: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):
Subject: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
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.
Subject: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).