mos
Joined: 19 Nov 2006 Posts: 4
|
Posted: Sat Jan 13, 2007 12:04 am Post subject: Error: 'Column "XXX" not found' when using 'AS' in |
|
|
Hi,
I'm running (again) in troubles with my database (Sybase ASA). You will find a demo solution in your email, but without Sybase database.
I'd created a strongly typed virtualrecord class, inheriting from virtualrecord. I'd declared a simple SELECT statement in a new recordset class, inheriting from virtualrecordset. In the SELECT statement, I've used AS for renaming the columns from the database. I defined the properties in the new record according to the renaming of the columns and everything works fine, but ... I can't update the record after changing some value. The Update throws a COMException:
Quote: | System.Runtime.InteropServices.COMException was unhandled
Message="[Sybase][ODBC Driver][Adaptive Server Anywhere]Spalte nicht gefunden: Spalte 'Description' nicht gefunden"
Source="Microsoft OLE DB Provider for ODBC Drivers"
ErrorCode=-2147217865
StackTrace:
bei ADODB.RecordsetClass.Update(Object Fields, Object Values)
bei Infralution.VirtualData.VirtualRecord.Update(Recordset recordset, Boolean refreshRecordset)
bei Infralution.VirtualData.VirtualRecord.Update(Boolean refreshRecordset)
bei CMS.BasicPanel.EndEditing(Boolean saveChanges) in C:\Dokument ... |
If i remove the AS statements, the values are updated in the correct way.
It seems to me, that VirtualRecordSet posts the false (means: the renamed instead of the the orginal) column name to ADO, but I dont know: I've tried the same thing with the Access Northwind Database and the updating works fine.
Do you have an idea, why the renaming wouldnt work with the Sybase ASA database? May be an error in the driver?
If you need the part of the database too, give me a hint.
Greeting,
Marc |
|