[freetds] Heeelo group! I'm having problem with FreeTDS and Wine...
Anton - Valqk
lists at lozenetz.net
Tue Apr 27 16:42:33 EDT 2004
Hello there all of you.
I've just subscribed.
I'm having the folowing problem:
I'm trying to run a windows programs that uses odbc and connects to
MSSQL db server using wine.
After a lot of fight and kickin' I've managed to connect to the MSSQL db
server but! I'm getting msgs for unimplemented ODBC:SQL.... and the
program returns an ODBC error..
OK, here we go....
Firstly I've made a google search and found how to use wine+odbc...
after taht compiled freetds with --enable-mssql --with-unixodbc=.....
when I got libtdsodbc.so , I've made a soft link to /usr/lib/libodbc.so
so wine can find it and redirect all odbc queries to the freetds lib.
after that I've made this config file:
tds version = 7.0
port = 1433
initial block size = 512
swap broken dates = no
swap broken money = no
try server login = yes
try domain login = no
; nt domain = WORKGROUP
# If the server responds with different domain try that one?
cross domain login = no
dump file = /home/valqk/freetds.log
debug level = 1
timeout = 10
connect timeout = 10
text size = 64512
# A typical Microsoft SQL Server 7.0 configuration
host = 192.168.58.50
port = 1433
tds version = 7.0
ok, As you can see the name of the connection is #-ed because wine sent
some strande requests to connect with servername SYBASE, and even if I
put SYBASE instead of ATLAS I've ended with IP Null , Server SYBASE not
found! That's why I put all attemps for connection to be sent to this
host(where my MSSQL is running). This is not a problem for me because
I'll use only this MSSQL server and nothing else so after solving other
problems I'll debug this issue... I think it'a a wine registry issue...
ok anyway we'r going on....
after that I've tested the connection using sqsh and it worked just fine
- pooling some data from the MSSQL.
Vioala, lets run the wine and windows proggie....
ok, as a beggingin - it's closed source program, using all possible
windows bulls....ts ....
so... I've built a fake_windows directory and copied some dll;s that
this program wanted, updated the registry so it can have odbc entries
and tryed to run it...
then wine printed some warning msgs :
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLAllocHandleStd
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLBrowseConnect
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLBulkOperations
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLDataSources
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLDescribeParam
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLDrivers
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLExtendedFetch
err:odbc:ODBC_LoadDMFunctions Failed to load function SQLSetPos
err:odbc:ODBC_LoadDMFunctions Failed to load function
err:x11drv:X11DRV_CreateWindow invalid window width 866403342
We can ingnore the last two, but I think as far as I understand how's it
working that these functions are not implemented in freetds...
I'm using version freetds 0.62.3...
ok, the program starts and asks me for u/p/dsn ... I enter them and it
returns odbc error, today the developers of the program pated me the src
where the error is occuring it's this(this is M$ code actually
//opebulkset.cpp : implementation file
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1997 Microsoft Corporation
// All rights reserved.
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
CODBCFieldInfo *pFInfo ;
int nFields = GetFieldCount();
for(int j=0; j<nFields; j++)
case SQL_LONGVARCHAR :
case SQL_CHAR :
case SQL_NUMERIC :
case SQL_VARCHAR :
case SQL_DECIMAL :
case SQL_GUID :
case SQL_WCHAR : //-8
case SQL_WVARCHAR : //-9
case SQL_WLONGVARCHAR: //-10
case SQL_INTEGER :
case SQL_FLOAT :
case SQL_DOUBLE :
case SQL_TIMESTAMP :
case SQL_SMALLINT :
case SQL_TINYINT :
case SQL_REAL :
case SQL_BIT :
CString err ;
// Here;s the error!
pFInfo->m_nSQLType==SQL_WLONGVARCHAR) // Memo text field
m_pFieldLength[j]=pFInfo-> m_nPrecision+1 ;
and In the log I just see selecting the database sai in the config
odbc.ini, setting the textsize and after that nothing...
that's all any help will be greatly appriciated!!!!
thanks in advace!
More information about the FreeTDS