Skip to Content.
Sympa Menu

freetds - RE: newbie

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Osman Çinar Eren <Cinar.Eren AT isbank.com.tr>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: newbie
  • Date: Wed, 9 Oct 2002 17:24:57 +0300


oki

i will have a look at the staff below but what i wonder is why the
SQLConnect() fails but
functions like SQLAllocEnv(), SQLAllocConnect(), etc. do not fail.

-----Original Message-----
From: Castellano, Nicholas [mailto:Nicholas_Castellano AT acml.com]
Sent: Wednesday, October 09, 2002 5:17 PM
To: TDS Development Group
Subject: [freetds] RE: newbie


I just went through this myself the other day. I'm guessing you are using
unixodbc. My problem was that I was trying to edit the unixodbc
configuration files by hand, and that didn't work. The right thing to do
seems to be to create template files and then use odbcinst to update the
unixodbc configuration from the templates. Have a look at
http://www.unixodbc.org/doc/FreeTDS.html which shows you how to create and
use the template files.

One other note... if I remember correctly, the odbcinst commands as shown on
that page created /root/.odbc.ini, and I then moved that to odbc.ini in the
system configuration directory (/usr/pkg/etc on my NetBSD system, probably
/usr/local/etc on your system).

If I get a few minutes to spare, I'll try to put together a few notes on
this and commit them along with some sample templates in the samples
directory...

HTH,
--entropy

-----Original Message-----
From: Osman Çinar Eren [mailto:Cinar.Eren AT isbank.com.tr]
Sent: Wednesday, October 09, 2002 8:47 AM
To: TDS Development Group
Subject: [freetds] RE: newbie


Hi,

i am on my way to use free-tds.
i selected odbc as the api.

The following call always returns an error immediately, although
freetds.conf has TESTC entry and the env variable,FREETDSCONF is set:

res=SQLConnect(Connection,"TESTC",SQL_NTS,"cinar",SQL_NTS,"cinar",SQL_NTS);
if (res!=SQL_SUCCESS)
{
printf("Unable to open data source (ret=%d)\n",res); CheckReturn(); exit(1);
}


the error is:


Unable to open data source (ret=-1)
SQL error IM002 -- [unixODBC][Driver Manager]Data source name not found, and
no default driver specified


what do i miss?

thanks in advance.
best regards.

---
You are currently subscribed to freetds as: [Nicholas_Castellano AT acml.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.



---
You are currently subscribed to freetds as: [cinar.eren AT isbank.com.tr]
To unsubscribe, forward this message to
$subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page