I have been attempting to use ODBC to communicate with a trial copy of the
OODB Matisse, and I think I may have come across a bug in the DBConnection class. I couldn't get Matisse (I thought) to return the column names. After further investigating I found that the column names WERE correctly returned in the the DBColAttr objects when I made the change below in DBConnection. Is this a bug in DBConnection? DBConnection>>maxColumnNameLength "Answer the <integer> maximum length of a column in the DBMS to which the receiver is connected." "^self getWordInfo: SQL_MAX_COLUMN_NAME_LEN" ^SQL_MAX_COLUMN_NAME_LEN. TIA, John Whittaker |
John,
> I have been attempting to use ODBC to communicate with a trial copy of the > OODB Matisse, and I think I may have come across a bug in the DBConnection > class. I couldn't get Matisse (I thought) to return the column names. > After further investigating I found that the column names WERE correctly > returned in the the DBColAttr objects when I made the change below in > DBConnection. > > Is this a bug in DBConnection? > > > DBConnection>>maxColumnNameLength > "Answer the <integer> maximum length of a column in the DBMS to which the > receiver is connected." > > "^self getWordInfo: SQL_MAX_COLUMN_NAME_LEN" > > ^SQL_MAX_COLUMN_NAME_LEN. I don't think it's a bug in DBConnection. SQL_MAX_COLUMN_NAME_LEN is an *index* of a configuration word in the ODBC driver (not the column name length itself) and is 30. By making the change you suggest, the DBConnection would be answering that the maximum column name length would be 30 characters for all databases. This will probably work in many situations but is not correct. It's a bit difficult to tell where the real problem lies but it might be in the ODBC driver you have for Matisse. When you were using the original form of #maxColumnNameLength with your ODBC connection what error did you receive or, alternatively, what value did it answer? Best Regards, Andy Bower Dolphin Support http://www.object-arts.com --- Are you trying too hard? http://www.object-arts.com/Relax.htm --- |
Andy,
It always answered zero. I am not an ODBC expert. All I went by was the fact that when using SQL_MAX_COLUMN_NAME_LEN I got the correct column name strings back. Is this something to throw over to the Matisse people? Thanks, John "Andy Bower" <[hidden email]> wrote in message news:3e8a9a87$[hidden email]... > John, > > > I don't think it's a bug in DBConnection. SQL_MAX_COLUMN_NAME_LEN is an > *index* of a configuration word in the ODBC driver (not the column name > length itself) and is 30. By making the change you suggest, the DBConnection > would be answering that the maximum column name length would be 30 > characters for all databases. This will probably work in many situations but > is not correct. > > It's a bit difficult to tell where the real problem lies but it might be in > the ODBC driver you have for Matisse. When you were using the original form > of #maxColumnNameLength with your ODBC connection what error did you receive > or, alternatively, what value did it answer? > > Best Regards, > > Andy Bower > Dolphin Support > http://www.object-arts.com > --- > Are you trying too hard? > http://www.object-arts.com/Relax.htm > --- > > |
John,
> It always answered zero. I am not an ODBC expert. All I went by was the > fact that when using SQL_MAX_COLUMN_NAME_LEN I got the correct column name > strings back. Is this something to throw over to the Matisse people? Yes, I think so. If I open an Access database vias ODBC and DBConnection and I send the #maxColumnNameLength message then I receive back 64. If the Matisse version is answering zero it would seem likely that there is a bug in their driver. Best Regards, Andy Bower Dolphin Support http://www.object-arts.com --- Are you trying too hard? http://www.object-arts.com/Relax.htm --- |
Free forum by Nabble | Edit this page |