Re: Cannot see / enumerate DSN ODBC using perl in Windows



Eadmund@xxxxxxxxxxxxx wrote:
Hi,

I've moved my working W2k3 Activestate Perl 5.8 system to another
server, but now, when I list my ODBC data sources (my @dsns = DBI-
data_sources('ODBC')) I get a blank, not my system DSN (which IS
configured and working), which DOES appear using the same code on my
old system, urmmm?

I'm assuming that this is a windows security/permissions issue, in
that the account running the perl script does not have access to the
ODBC system DSNs. I have absolutley no idea where to permission this
up, as there appears to be no ODBC/SYSTEM DSN service, or special
security group I can find, any ideas???

Thanks

Ed (eadmund@xxxxxxxxxxxxx)



Are you saying that when you logon to your 2003 box as user X you can run up the odbc administrator and see a SYSTEM DSN , you can run another app that uses that SYSTEM DSN but Perl's data_sources run as the same user does not return the DSN?

Unless there is something under 2003 which associates certain permissions with executables I cannot see how the system would differentiate between user X running non-perl apps and perl. Of course there could be a bug in DBD::ODBC (looking now I see it does not report any errors but would just return an empty list if it errored).

What is the name of the SYSTEM DSN you have created?

Assuming nothing else occurs, if I sent you some C code (and/or an executable) could you compile/run it on this machine? It would simply be calls to SQLDataSources with error reporting.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
.



Relevant Pages

  • Re: Not able to connect to Mysql Database using ODBC
    ... Installed mysql,perl,mysql odbc drivers ... I have not used MySQL on Windows myself but the normal way to access MySQL from Perl is using DBD::mysql - perhaps that is not available for Windows. ... If you need to use ODBC then there are two DBI drivers to choose from DBD::ODBC and DBD::W32ODBC. ... Have you created a DSN called TestMyDSN in the ODBC Administrator in Control Panel? ...
    (perl.dbi.users)
  • Re: [OT] Perl CGI script using Win::ODBC module - failed login on
    ... > Ok I have an issue with a CGI script that I have written in Perl using ... > associated with a trusted SQL server connection". ... username and password for the DSN properly in the ODBC manager (i.e., ... It definitely doesn't sound like a Perl problem, ...
    (comp.lang.perl.misc)
  • Re: Simple DBD question
    ... DSN but when you attempt to make a connection via DBD::ODBC it says data source not found and no default driver specified. ... Im assuming Perl does not care about the system DSN anyway. ...
    (comp.lang.perl.misc)
  • Re: MSSQL 2000 Connect Success
    ... > All the heck I wanted to do was to connect via a DSN to a darn MSSQL ... > server, and get some data. ... > Perl being free, and with the availability of Tk, I rather expect Perl ...
    (comp.lang.perl.misc)
  • Simple DBD question
    ... DSN but when you attempt to make a connection via DBD::ODBC it says ... data source not found and no default driver specified. ... Im assuming Perl does not care about the system DSN anyway. ...
    (comp.lang.perl.misc)