Jeff Urlwin wrote: > Well, I'm not especially solid on the FreeTDS. I did not realize that > FreeTDS supplied an ODBC driver. I thought that FreeTDS was to be used with > DBD::Sybase to talk to SQL Server
They do have a ODBC driver, but it is "basic" at the moment, the DBD:Sybase option would be better supported, as the freeTDS coders are not that focused on ODBC. > > > Jeff > > > > > Hi > > I am having problems working with the DBD::ODBC driver. > > > > I am using unixODBC and FreeTDS connecting to MS SQL Server. They > > work well together and I have tested it. THe problem comes when I try > > to use Perl DBD::ODBC (version 0.28). So, I know my DSN entery is ok. > > > > This is the code (5 lines) and the Error I get. CAn you please tell > > me why this may happen? I have tried searching for a week now. > > > > #!/usr/bin/perl > > use DBI; > > use DBD::ODBC; > > my $DSN > > ='driver={myserver};hostname=x.y.x;port=200;database=X;uid=x;pwd=x;'; > > my $dbh= DBI->connect("dbi::ODBC:$DSN") or die "$DBI::errstr\n"; > > If you are using driver={} then it needs to be the entry in odbcinst.ini not in odbc.ini, So I would expect either driver={TDS};... or dsn=myserver;... > > > The error I get is > > > > DBI->connect(....) failed:[unixODBC][Drver Manager] Data source name > > not found, and no default driver specified (SQL-IM002). > > > > I have set the $DBI_DSN variable to dbi:odbc:myserver > > > > I know the unixODBC and the free TDS have been installed right. > > Can you help me with this? > > > > Thanks > > Amit > > > > -- Nick Gorham Emacs would be a great operating system if it just had a decent text editor...