freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Heeelo group! I'm having problem with FreeTDS and Wine...
- From: Anton - Valqk <lists AT lozenetz.net>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Heeelo group! I'm having problem with FreeTDS and Wine...
- Date: Tue, 27 Apr 2004 23:42:33 +0300
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:
[global]
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
#[ATLAS]
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
SQLSetScrollOptions
fixme:ole:CoRegisterMessageFilter stub
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.
):
-----------------------------
void CDynamicBulkSet::InitFields()
{
CODBCFieldInfo *pFInfo ;
int nFields = GetFieldCount();
m_strFieldNames.RemoveAll() ;
for(int j=0; j<nFields; j++)
{
pFInfo=&m_rgODBCFieldInfos[j] ;
switch(pFInfo->m_nSQLType)
{
case SQL_LONGVARCHAR :
case SQL_CHAR :
case SQL_NUMERIC :
case SQL_VARCHAR :
case SQL_DECIMAL :
case SQL_GUID :
//unicode text
case SQL_WCHAR : //-8
case SQL_WVARCHAR : //-9
case SQL_WLONGVARCHAR: //-10
m_pFieldType[j]=GEN_STRING ;
break ;
case SQL_INTEGER :
m_pFieldType[j]=GEN_LONG ;
break ;
case SQL_FLOAT :
case SQL_DOUBLE :
m_pFieldType[j]=GEN_DOUBLE ;
break ;
case SQL_TIMESTAMP :
m_pFieldType[j]=GEN_DATE ;
break ;
case SQL_SMALLINT :
m_pFieldType[j]=GEN_INT ;
break ;
case SQL_TINYINT :
m_pFieldType[j]=GEN_BYTE ;
break ;
case SQL_REAL :
m_pFieldType[j]=GEN_FLOAT ;
break ;
case SQL_BIT :
m_pFieldType[j]=GEN_BOOL ;
break ;
case SQL_BINARY:
m_pFieldType[j]=GEN_BINARY ;
break ;
default :
CString err ;
err.Format("%3d",j+1) ;
// Here;s the error!
TRACE0(MakeErrorMessage(GEN_MES_0018,err,m_strInfoName));
break ;
}
if(pFInfo->m_nSQLType==SQL_LONGVARCHAR ||
pFInfo->m_nSQLType==SQL_WLONGVARCHAR) // Memo text field
m_pFieldLength[j]=MEMO_TEXT_SIZE ;
else
m_pFieldLength[j]=pFInfo-> m_nPrecision+1 ;
m_pFieldDecim[j]=6 ;
m_pFieldIgnore[j]=0 ;
m_strFieldNames.Add(pFInfo->m_strName) ;
}
return ;
}
-----------------------------------------
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!
-
[freetds] Heeelo group! I'm having problem with FreeTDS and Wine...,
Anton - Valqk, 04/27/2004
-
Re: [freetds] Heeelo group! I'm having problem with FreeTDS and Wine...,
James K. Lowden, 04/28/2004
- Re: [freetds] Heeelo group! I'm having problem with FreeTDS and Wine..., Anton - Valqk, 04/29/2004
-
Re: [freetds] Heeelo group! I'm having problem with FreeTDS and Wine...,
James K. Lowden, 04/28/2004
Archive powered by MHonArc 2.6.24.