| 1 |
diff -ru wizards.orig/com/sun/star/wizards/db/DBMetaData.java wizards/com/sun/star/wizards/db/DBMetaData.java
|
| 2 |
--- wizards.orig/com/sun/star/wizards/db/DBMetaData.java 2009-07-30 14:28:39.000000000 +0100
|
| 3 |
+++ wizards/com/sun/star/wizards/db/DBMetaData.java 2009-07-30 14:33:22.000000000 +0100
|
| 4 |
@@ -748,11 +748,11 @@
|
| 5 |
}
|
| 6 |
}
|
| 7 |
|
| 8 |
- public boolean supportsCoreSQLGrammar()
|
| 9 |
+ public boolean supportsPrimaryKey()
|
| 10 |
{
|
| 11 |
try
|
| 12 |
{
|
| 13 |
- return xDBMetaData.supportsCoreSQLGrammar();
|
| 14 |
+ return xDBMetaData.supportsMinimumSQLGrammar() || xDBMetaData.supportsCoreSQLGrammar();
|
| 15 |
}
|
| 16 |
catch (SQLException e)
|
| 17 |
{
|
| 18 |
diff -ru wizards.orig/com/sun/star/wizards/table/TableWizard.java wizards/com/sun/star/wizards/table/TableWizard.java
|
| 19 |
--- wizards.orig/com/sun/star/wizards/table/TableWizard.java 2009-07-30 14:28:39.000000000 +0100
|
| 20 |
+++ wizards/com/sun/star/wizards/table/TableWizard.java 2009-07-30 14:29:50.000000000 +0100
|
| 21 |
@@ -250,7 +250,7 @@
|
| 22 |
{
|
| 23 |
curScenarioSelector = new ScenarioSelector(this, this.curTableDescriptor, slblFields, slblSelFields);
|
| 24 |
curFieldFormatter = new FieldFormatter(this, curTableDescriptor);
|
| 25 |
- if (this.curTableDescriptor.supportsCoreSQLGrammar())
|
| 26 |
+ if (this.curTableDescriptor.supportsPrimaryKey())
|
| 27 |
{
|
| 28 |
curPrimaryKeyHandler = new PrimaryKeyHandler(this, curTableDescriptor);
|
| 29 |
}
|
| 30 |
@@ -264,7 +264,7 @@
|
| 31 |
boolean bTableCreated = false;
|
| 32 |
String schemaname = curFinalizer.getSchemaName();
|
| 33 |
String catalogname = curFinalizer.getCatalogName();
|
| 34 |
- if (curTableDescriptor.supportsCoreSQLGrammar())
|
| 35 |
+ if (curTableDescriptor.supportsPrimaryKey())
|
| 36 |
{
|
| 37 |
String[] keyfieldnames = curPrimaryKeyHandler.getPrimaryKeyFields(curTableDescriptor);
|
| 38 |
if (keyfieldnames != null)
|
| 39 |
@@ -359,7 +359,7 @@
|
| 40 |
int i = 0;
|
| 41 |
i = insertRoadmapItem(0, true, m_oResource.getResText(UIConsts.RID_TABLE + 2), SOMAINPAGE);
|
| 42 |
i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 3), SOFIELDSFORMATPAGE);
|
| 43 |
- if (this.curTableDescriptor.supportsCoreSQLGrammar())
|
| 44 |
+ if (this.curTableDescriptor.supportsPrimaryKey())
|
| 45 |
{
|
| 46 |
i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 4), SOPRIMARYKEYPAGE);
|
| 47 |
}
|
| 48 |
diff -ru dbaccess.orig/source/ui/misc/WCopyTable.cxx dbaccess/source/ui/misc/WCopyTable.cxx
|
| 49 |
--- dbaccess.orig/source/ui/misc/WCopyTable.cxx 2009-07-30 12:58:32.000000000 +0100
|
| 50 |
+++ dbaccess/source/ui/misc/WCopyTable.cxx 2009-07-30 14:18:18.000000000 +0100
|
| 51 |
@@ -1364,7 +1364,7 @@
|
| 52 |
try
|
| 53 |
{
|
| 54 |
Reference< XDatabaseMetaData > xMetaData( _rxConnection->getMetaData(), UNO_QUERY_THROW );
|
| 55 |
- bSupports = xMetaData->supportsCoreSQLGrammar();
|
| 56 |
+ bSupports = xMetaData->supportsCoreSQLGrammar() || xMetaData->supportsMinimumSQLGrammar();
|
| 57 |
}
|
| 58 |
catch(const Exception&)
|
| 59 |
{
|
| 60 |
diff -ru dbaccess.orig/source/ui/tabledesign/TableController.cxx dbaccess/source/ui/tabledesign/TableController.cxx
|
| 61 |
--- dbaccess.orig/source/ui/tabledesign/TableController.cxx 2009-07-30 12:58:31.000000000 +0100
|
| 62 |
+++ dbaccess/source/ui/tabledesign/TableController.cxx 2009-07-30 14:18:18.000000000 +0100
|
| 63 |
@@ -1119,7 +1119,7 @@
|
| 64 |
}
|
| 65 |
if(!bFoundPKey)
|
| 66 |
{
|
| 67 |
- if(_bNew && xMetaData.is() && xMetaData->supportsCoreSQLGrammar())
|
| 68 |
+ if(_bNew && xMetaData.is() && (xMetaData->supportsCoreSQLGrammar() || xMetaData->supportsMinimumSQLGrammar()))
|
| 69 |
{
|
| 70 |
String sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
|
| 71 |
String sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
|
| 72 |
diff -ru dbaccess.orig/source/ui/tabledesign/TEditControl.cxx dbaccess/source/ui/tabledesign/TEditControl.cxx
|
| 73 |
--- dbaccess.orig/source/ui/tabledesign/TEditControl.cxx 2009-07-30 12:58:31.000000000 +0100
|
| 74 |
+++ dbaccess/source/ui/tabledesign/TEditControl.cxx 2009-07-30 14:18:18.000000000 +0100
|
| 75 |
@@ -1527,7 +1527,7 @@
|
| 76 |
Reference<XConnection> xCon = rController.getConnection();
|
| 77 |
|
| 78 |
Reference< XDatabaseMetaData> xMetaData = xCon.is() ? xCon->getMetaData() : Reference< XDatabaseMetaData>();
|
| 79 |
- if(!xMetaData.is() || !xMetaData->supportsCoreSQLGrammar())
|
| 80 |
+ if(!xMetaData.is() || (!xMetaData->supportsCoreSQLGrammar() && !xMetaData->supportsMinimumSQLGrammar()))
|
| 81 |
return sal_False; // no primary keys allowed
|
| 82 |
|
| 83 |
}
|