Hi,
I finally got openDbx working with FreeTDS and ODBC, I don't know 
what went wrong last night, I suppose my computer got tired ;)
This is great !

However, I found
- a much better performance with ODBC backend (DBXOdbcPlatform) in 
the test I did than with Freetds (DBXMSSQLPlatform) (run the test 
below, changing DBXOdbcPlatform to DBXMSSQLPlatform).
With the ODBC backend the test ran about 2 times faster thant 
MSSQL-freetds backend (needs explorations here)
- perhaps a problem with TinyInt datatype ?
 (not very important) 

The test below consist read the column definitions of syscolumns and 
does not need any other database than master.
Set myhost, myport, mydb, myuser and mypassword as appropriate.
If you uncomment c.xprec, you will have the TinyInt error

500 timesRepeat: [
        | conn connectionSettings result  sql |

        sql := 'select c.name, c.id,  s.name , c.length --, c.xprec --, 
c.xscale,  c.xtype 
        from master..sysobjects as o
        inner join master..syscolumns as c
         on o.id = c.id
        inner join master..systypes as s 
         on c.xtype = s.xtype
        where o.name = ''syscolumns'''.
            connectionSettings := DBXConnectionSettings
                        host: 'myhost'
                        port: '1884'
                        database: 'mydb'
                        userName: 'myuser'
                        userPassword: 'mypassword'.
        [       conn := DBXConnection platform: DBXOdbcPlatform new settings: 
connectionSettings.
                conn connect.
                conn open.
                result := conn execute: sql.
                result rowsDo: [ :r | 
                        1 to: result columnCount do: [:c|
                                | v |
                                v := r rawValueAt: c.]].
        ] ensure: [ conn close ]].
        
Cheers,
Alain

-- 
Alain_rastoul


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to