Issue 95712 - Save View to SQL Server 2005 via JDBC returns error
Summary: Save View to SQL Server 2005 via JDBC returns error
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOO300m9
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2008-10-31 17:26 UTC by ecklesj
Modified: 2013-01-29 21:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description ecklesj 2008-10-31 17:26:21 UTC
OOo Base 3.0.0 OOO300m9 (Build:9358)
Connecting to Microsoft SQL Server 2005 9.0.3073
via Microsoft SQL Server JDBC Driver 1.2 with integrated security.

If I create a create a View in design mode and then try to save the view, I 
select the database name for the Catalog value, the schema name for the Schema 
value, and enter a name for the new view for the Table Name value.  When I 
click OK, Base presents the following error:

"'CREATE/ALTER VIEW' does not allow specifying the database name as a prefix to 
the object name."

If I turn off design mode to go to sql mode and click the "Run SQL Command 
Directly" button, modify the SQL to read

Create view "DatabaseName"."SchemaName"."ViewName" as 
Select afield from mytable

and try to run that statement, the same error message is returned.  If the 
database name is removed from the statement, the command runs fine in direct 
SQL mode.  For example, this would work:

Create view "SchemaName"."ViewName" as 
Select afield from mytable

I think the ideal solution is to allow there to be no value for Catalog in the 
Create View statement that Base sends when saving a view in design mode.
Comment 1 ecklesj 2008-10-31 17:28:29 UTC
FYI, tested the same issue via ODBC connection and received same error message.