summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/adabas/BKeys.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/adabas/BKeys.cxx')
-rw-r--r--connectivity/source/drivers/adabas/BKeys.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx
index 9c130d6e5690..97c38d818efa 100644
--- a/connectivity/source/drivers/adabas/BKeys.cxx
+++ b/connectivity/source/drivers/adabas/BKeys.cxx
@@ -65,7 +65,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R
sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)));
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
@@ -73,11 +73,11 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R
if(nKeyType == KeyType::PRIMARY)
{
- aSql = aSql + ::rtl::OUString::createFromAscii(" ALTER PRIMARY KEY (");
+ aSql = aSql + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER PRIMARY KEY ("));
}
else if(nKeyType == KeyType::FOREIGN)
{
- aSql = aSql + ::rtl::OUString::createFromAscii(" FOREIGN KEY (");
+ aSql = aSql + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FOREIGN KEY ("));
}
else
throw SQLException();
@@ -90,9 +90,9 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R
Reference< XPropertySet > xColProp;
xColumns->getByIndex(i) >>= xColProp;
aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote
- + ::rtl::OUString::createFromAscii(",");
+ + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
}
- aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
+ aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")));
sal_Int32 nUpdateRule = 0, nDeleteRule = 0;
::rtl::OUString sReferencedName;
@@ -106,32 +106,32 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R
sal_Int32 nLen = sReferencedName.indexOf('.');
aSchema = sReferencedName.copy(0,nLen);
aName = sReferencedName.copy(nLen+1);
- aSql += ::rtl::OUString::createFromAscii(" REFERENCES ")
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" REFERENCES "))
+ aQuote + aSchema + aQuote + sDot + aQuote + aName + aQuote;
- aSql += ::rtl::OUString::createFromAscii(" (");
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ("));
for(sal_Int32 i=0;i<xColumns->getCount();++i)
{
Reference< XPropertySet > xColProp;
xColumns->getByIndex(i) >>= xColProp;
aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN))) + aQuote
- + ::rtl::OUString::createFromAscii(",");
+ + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
}
- aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
+ aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")));
switch(nDeleteRule)
{
case KeyRule::CASCADE:
- aSql += ::rtl::OUString::createFromAscii(" ON DELETE CASCADE ");
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON DELETE CASCADE "));
break;
case KeyRule::RESTRICT:
- aSql += ::rtl::OUString::createFromAscii(" ON DELETE RESTRICT ");
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON DELETE RESTRICT "));
break;
case KeyRule::SET_NULL:
- aSql += ::rtl::OUString::createFromAscii(" ON DELETE SET NULL ");
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON DELETE SET NULL "));
break;
case KeyRule::SET_DEFAULT:
- aSql += ::rtl::OUString::createFromAscii(" ON DELETE SET DEFAULT ");
+ aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON DELETE SET DEFAULT "));
break;
default:
;