Kaydet (Commit) bbe91b65 authored tarafından Ocke Janssen's avatar Ocke Janssen

use of qouteName

üst 7bbc239c
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: CIndexes.cxx,v $ * $RCSfile: CIndexes.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: oj $ $Date: 2000-11-15 16:07:40 $ * last change: $Author: oj $ $Date: 2001-01-31 10:54:36 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -199,7 +199,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des ...@@ -199,7 +199,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des
dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable,aComposedName,sal_True); dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable,aComposedName,sal_True);
if(aName.getLength()) if(aName.getLength())
{ {
aSql = aSql + aQuote + aName + aQuote aSql = aSql + ::dbtools::quoteName( aQuote,aName )
+ ::rtl::OUString::createFromAscii(" ON ") + ::rtl::OUString::createFromAscii(" ON ")
+ aComposedName + aComposedName
+ ::rtl::OUString::createFromAscii(" ( "); + ::rtl::OUString::createFromAscii(" ( ");
...@@ -210,7 +210,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des ...@@ -210,7 +210,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des
for(sal_Int32 i=0;i<xColumns->getCount();++i) for(sal_Int32 i=0;i<xColumns->getCount();++i)
{ {
xColumns->getByIndex(i) >>= xColProp; xColumns->getByIndex(i) >>= xColProp;
aSql = aSql + aQuote + comphelper::getString(xColProp->getPropertyValue(PROPERTY_NAME)) + aQuote; aSql = aSql + ::dbtools::quoteName( aQuote,comphelper::getString(xColProp->getPropertyValue(PROPERTY_NAME)));
aSql = aSql + (any2bool(xColProp->getPropertyValue(PROPERTY_ISASCENDING)) aSql = aSql + (any2bool(xColProp->getPropertyValue(PROPERTY_ISASCENDING))
? ?
::rtl::OUString::createFromAscii(" ASC") ::rtl::OUString::createFromAscii(" ASC")
...@@ -232,7 +232,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des ...@@ -232,7 +232,7 @@ void SAL_CALL OIndexes::appendByDescriptor( const Reference< XPropertySet >& des
xColumns->getByIndex(0) >>= xColProp; xColumns->getByIndex(0) >>= xColProp;
aSql = aSql + aDot + aQuote + comphelper::getString(xColProp->getPropertyValue(PROPERTY_NAME)) + aQuote; aSql = aSql + aDot + ::dbtools::quoteName( aQuote,comphelper::getString(xColProp->getPropertyValue(PROPERTY_NAME)));
} }
Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( );
...@@ -261,6 +261,7 @@ void SAL_CALL OIndexes::dropByName( const ::rtl::OUString& elementName ) throw(S ...@@ -261,6 +261,7 @@ void SAL_CALL OIndexes::dropByName( const ::rtl::OUString& elementName ) throw(S
{ {
::rtl::OUString aName,aSchema; ::rtl::OUString aName,aSchema;
sal_Int32 nLen = elementName.indexOf('.'); sal_Int32 nLen = elementName.indexOf('.');
if(nLen != -1)
aSchema = elementName.copy(0,nLen); aSchema = elementName.copy(0,nLen);
aName = elementName.copy(nLen+1); aName = elementName.copy(nLen+1);
...@@ -273,8 +274,8 @@ void SAL_CALL OIndexes::dropByName( const ::rtl::OUString& elementName ) throw(S ...@@ -273,8 +274,8 @@ void SAL_CALL OIndexes::dropByName( const ::rtl::OUString& elementName ) throw(S
::rtl::OUString aComposedName; ::rtl::OUString aComposedName;
dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema2,aTable,aComposedName,sal_True); dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema2,aTable,aComposedName,sal_True);
aSql = aSql + aQuote + aSchema + aQuote aSql = aSql + ::dbtools::quoteName( aQuote,aSchema)
+ aDot + aQuote + aName + aQuote + aDot + ::dbtools::quoteName( aQuote,aName)
+ ::rtl::OUString::createFromAscii(" ON ") + ::rtl::OUString::createFromAscii(" ON ")
+ aComposedName; + aComposedName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment