Is it possible to query an OleDB connection to find out if you must use square brackets or quotes?
SQL:
SELECT [FullName] From [My Users]
Oracle
SELECT "FullName" From "My Users"
MySQL:
SELECT `FullName` From `My Users`
Is it possible to query an OleDB connection to find out if you must use square brackets or quotes?
SQL:
SELECT [FullName] From [My Users]
Oracle
SELECT "FullName" From "My Users"
MySQL:
SELECT `FullName` From `My Users`
OLE DB itself has the IDBInfo interface with the GetLiteralInfo method. A couple of the pieces of information in it are DBLITERAL_QUOTE_PREFIX and DBLITERAL_QUOTE_SUFFIX, which is the information you are looking for. If the provider you are using exposes that interface, then you should be able to access it through ADO via the OpenSchema method. The SchemaEnum contains adSchemaDBInfoLiterals, which should return a Recordset with the desired information.