To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=78725
                 Issue #|78725
                 Summary|Sort failure in DSB with renamed columns
               Component|Database access
                 Version|OOo 2.2
                Platform|PC
                     URL|
              OS/Version|Windows Vista
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|none
             Assigned to|dbaneedsconfirm
             Reported by|jhansonxi





------- Additional comments from [EMAIL PROTECTED] Thu Jun 21 02:58:52 +0000 
2007 -------
OOO 2.2.0 on Vista connecting to an Access 2007 DB via ADO.
If a query renames a column using the "AS" keyword, attempting to sort the data
in the data source browser fails on that column.  Error dialogs:

The data content could not be updated



SQL Status: 07001

Error code: -2147217904



[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.



The SQL command leading to this error is:



SELECT `PDES`.`PartNumber` AS `PN`, `PDES`.`InventoryLocation` AS `Location`,
`PDES`.`QuantityOnHand` AS `Qty`, `PDES`.`Description`, `MFG`.`CompanyName` AS
`Mfg`, `MFGPN`.`ManufacturerPart` AS `Mfg PN`, `PDES`.`Voltage`,
`PDES`.`Current`, `PDES`.`Power`, `PDES`.`MinimumTemperature` AS `MinTemp`,
`PDES`.`MaximumTemperature` AS `MaxTemp`, `PDES`.`Case`,
`PDES`.`DefaultFootprint`, `PDES`.`VisualIdentifier` AS `Visual ID`,
`DIST`.`CompanyName` AS `Dist`, `DISTPN`.`DistributorPart` AS `DistPN` FROM ( (
( `Parts` AS `PDES` LEFT JOIN `ManufacturerParts` AS `MFGPN` ON
`MFGPN`.`SienaPart` = `PDES`.`PartNumber` ) LEFT JOIN `Manufacturers` AS `MFG`
ON `MFG`.`ID` = `MFGPN`.`Manufacturer` ) LEFT JOIN `DistributorParts` AS
`DISTPN` ON `DISTPN`.`ManufacturerPart` = `MFGPN`.`ID` ) LEFT JOIN
`Distributors` AS `DIST` ON `DIST`.`ID` = `DISTPN`.`Distributor` WHERE
`PDES`.`Class` LIKE '14' ORDER BY `Mfg`

Readable original query (why does OOO remove line breaks?):
SELECT 

PDES.`PartNumber` AS `PN`,

PDES.`InventoryLocation` AS `Location`,

PDES.`QuantityOnHand` AS `Qty`,

PDES.`Description`,

MFG.`CompanyName` AS `Mfg`,

MFGPN.`ManufacturerPart` AS `Mfg PN`,

PDES.`Voltage`,

PDES.`Current`,

PDES.`Power`,

PDES.`MinimumTemperature` AS `MinTemp`,

PDES.`MaximumTemperature` AS `MaxTemp`,

PDES.`Case`,

PDES.`DefaultFootprint`,

PDES.`VisualIdentifier` AS `Visual ID`,

DIST.`CompanyName` AS `Dist`,

DISTPN.`DistributorPart` AS `DistPN`

FROM (((Parts PDES

LEFT JOIN `ManufacturerParts` MFGPN ON MFGPN.`SienaPart`=PDES.`PartNumber`)

LEFT JOIN `Manufacturers` MFG ON MFG.`ID`=MFGPN.`Manufacturer`)

LEFT JOIN `DistributorParts` DISTPN ON DISTPN.`ManufacturerPart`=MFGPN.`ID`)

LEFT JOIN `Distributors` DIST ON DIST.`ID`=DISTPN.`Distributor`

WHERE PDES.`Class` LIKE '14'


If the ORDER BY statement is replaced with the following then it works:
ORDER BY MFG.`CompanyName`

I get the same error in CuteSQL so it's the structure of the ORDER BY statement
that OOO adds that is incompatible with this query.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to