 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
jeffw8713
Joined: 17 Nov 2010 Posts: 19 Country: United States |
|
Use Database Formatting Issue |
|
I have SQL Assistant setup to use either Enter or Tab for List Item Selection Key.
When I use either Enter or Tab in the FROM clause, it works as expected. However, when I use either on a USE statement it gives me a new line instead of going to the end of the line.
Use Data{tab} -- this should put the cursor at the end of the database that was selected
Instead, the cursor is on the next line.
Any ideas on why this is happening?
Thanks,
Jeff
|
|
Thu Sep 01, 2011 5:27 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Experienced the same within snippets. Some databases produce a new line instead of the snippet result when selecting a database for $OBJECT$. Does not affect every database but I could not narrow down what is the cause of it.
|
|
Thu Sep 01, 2011 5:58 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please note change in behavior in version 6. In version 5, when after USE keyword you select database name and press Enter key, the cursor remains on the same line after the inserted database name and you have to press Enter key second time to move it to the next line. In version 6 you need to press Enter key only once. Also please note that $OBJECT$ macro can be used to select database names programmatically, but that is not the intended use of the macro. As the name suggests, the macro is for selecting objects.
|
|
Thu Sep 01, 2011 11:32 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
 |
 |
Also please note that $OBJECT$ macro can be used to select database names programmatically, but that is not the intended use of the macro. As the name suggests, the macro is for selecting objects. |
Frankly said. Still, I use that side-effect in many of my snippets and the reason I think it's a bug is that the issue [SA 6] - $OBJECT$ degraded is only partially fixed. Though it does insert database.schema.object for objects from other databases, it still omits database part when selecting an object from the current database even if it was specified using two or three part qualifier by selecting the database first from the popup. This explains why does the test snippet (being a lone $OBJECT$) result in database name when selecting a database other than current and in an empty line when selecting the current one.
Now you might say there is no need to qualify the current database but the script may contain an USE clause which will change the context and the database will not be the current one anymore.
|
|
Fri Sep 02, 2011 3:34 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
 |
 |
Though it does insert database.schema.object for objects from other databases, it still omits database part when selecting an object from the current database even if it was specified using two or three part qualifier by selecting the database first from the popup. |
This behavior surely sounds suspicious to me, might be a bug. Let me check with the team if that can be corrected via some changes in the settings or requires a bug fix.
|
|
Fri Sep 02, 2011 5:04 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
That would be nice, thank you.
|
|
Sat Sep 03, 2011 12:28 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
The database part is still omitted in v6.0.86.
|
|
Fri Oct 07, 2011 6:03 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|