Hi Jason > -----Original Message----- > From: Jason L. McAffee [mailto:[EMAIL PROTECTED] > Sent: Freitag, 14. Januar 2005 22:39 > To: [email protected] > Subject: MaxDB ODBC Issue > > > Hi, > > I've been experiencing a number of errors after > converting my company's database from MS SQL 2000 to MaxDB 7.5. From > what I've been reading on the lists is that the ODBC driver for MaxDB > rejects the creation of certain RecordSets that are opened using key > words such as "Count", "Distinct", and "Group By". It seems > to be part > of some kind of kernel management on the ODBC's part. Apparently I > could change the SQLSetStmtAttr to SQL_Concur_Read_Only, but I don't > really know what this is referring to.
Please compare with http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdconcursorlockmatrix.asp > Is it referring to the C code of the ODBC driver itself? No, but to the parameters which can be set via ODBC. > If so would I have to rebuild the ODBC driver? No. > What other implications would changing this parameter have? I don't know whether it is possible to define a default lock property inside ADO. Maybe you can set it once and it is always used by result sets as default. > Is there any other drivers/ driver versions that are compatible with > MaxDB that would behave in this manner? At the moment ODBC from SAP DB 7.3 to MaxDB 7.5.00 can be used. > I was under the impression that ODBC drivers should all > respond the same > way to allow for interoperability, why is this driver behaving > differently? The question is, what happens if you try to update the result set you get. Since it is a count of lines, this does not seem sensible. As the property is apparently set by ADO, I don't see another way as setting it to adLockReadOnly (maybe via an application wide default). > It is unrealistic to search through thousands of lines of code in my > application and change any Recordsets to adLockReadOnly, nor is it > realistic to expect that any 3rd party application using MaxDB would > adhere to this format. Maybe the application uses a lock property that is actual not the proper one for some result sets. > > My driver information: > > MaxDB ODBC 7.5.00.19 > > > > Code causing error: > > strConnection = > "Driver={MaxDB};server=(omitted);uid=(omitted);pwd=(omitted);d > atabase=(o > mitted);option=3" > > Set adoDataConn = Server.CreateObject("ADODB.Connection") > > adoDataConn.Open strConnection > > > > SQL = "SELECT Count(*) AS CNT from my_table WHERE my_value = '" & > a_value & "'" > > Set RS = Server.CreateObject("ADODB.Recordset") > > RS.Open SQL, adoDataConn, 3, 3 '<-- Error > points to this line To be completely sure about all this stuff, you could make an ODBC driver manager trace. http://sapdb.2scale.net/moin.cgi/ODBCTrace I guess that there will be explicit calls of the kind SQLSetStmtAttr (..., SQL_ATTR_CONCURRENCY, <lock property>, ...) where lock property is not SQL_CONCUR_READ_ONLY. Regards Thomas ---------------------------------------------- Dr. Thomas K�tter SAP AG, SAP Labs Berlin Do you know SAP^H^H^H MaxDB ? www.mysql.com/products/maxdb www.sapdb.org -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
