How do I delete my blog?
Cannot see AND Windows system DSN's using DBD-ODBC
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Perl web-programming > Cannot see AND Windows system DSN's using DBD-ODBC 13 May 2008 00:29:08

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Cannot see AND Windows system DSN's using DBD-ODBC

Steven Perreau 13 May 2008 00:29:08
 Hello.



I'm having terrible trouble with www.troubleticketex­press.com
<http://www.trouble­ticketexpress.com/> getting their SQL module to
work. I have done a support case with them, they say it's a permissions
issue and not their script helpdesk support software.



I am running MS SBS on Windows 2003 SP2

IIS 6.0

SQL 2000 with SP4

DBD-ODBC V1.15

ActivePerl V5.10.0.1002



I have a DB created in SQL.

I have an ODBC System DSN created using MS Control Panel (in there a few
of them for other things already)

The ODBC DSN works fine and tests ok inside control panel.



I have tried lots of options for the IIS Aplication Pools, using Local
Service, Local System, specified account, making sure that account has
DB_OWNER access and a correct MS logon inside SQL...



I just don't know where to go.





The perl script reports:

Error: No ODBC DSN records found on this server.
Please configure DSN prior to running this program.





Which is rubbish... but obviously it cannot seen ANY of the 5+ System
DSN's that are present.



What am I doing wrong?





Regards,


Steven Perreau



Add comment
Steven Perreau 13 May 2008 00:29:08 permanent link ]
 Here's the code that does this, maybe some guru can see something wrong!


#!/usr/bin/perl
#
# This script is a part of
# Trouble Ticket Express package.
# http://www.troublet­icketexpress.com
#
# COPYRIGHT: 2005-2007, United Web Coders
# http://www.unitedwe­bcoders.com
#
# $Revision: 447 $
# $Date: 2007-10-11 18:39:10 +0400 (Thu, 11 Oct 2007) $
#

my $configfile;
my $VERSION = '2.24';
my $REVISION;

# ==== NOTHING TO EDIT BELOW THIS LINE. PLS DO NOT CROSS
===================­====

BEGIN {
if ($^O eq 'MSWin32') {
eval "use FindBin";
eval "use lib $FindBin::Bin";
chdir($FindBin::Bin­);
}
$REVISION = '$Revision: 447 $';
if ($REVISION =~ /(\d+)/) {
$REVISION = $1;
}
}

use strict;
use CGI;
use TTXConfig;
use TTXMSSQLSetup;
use TTXData;

#
# Global vars
#
my $cfg;
my $query;
my %data;

print "HTTP/1.0 200 OK\n" if $ENV{PERLXS} eq "PerlIS";
print "Content-type: text/html\n\n";
header();
#
# Read config
#
$configfile = 'ttxcfg.cgi' if $configfile eq undef;
$cfg = TTXConfig->new($con­figfile);
runsetup() if $cfg eq undef || $cfg->error() ne undef;
if ($cfg->get('cfgref'­) ne undef) {
my $regcfg = TTXConfig->new($cfg­->get('cfgref'));
$cfg = $regcfg;
runsetup() if $cfg->error() ne undef;
}
TTXData::set('CONFI­G', $cfg);
#
# Parse input
#
$query = new CGI;
#
# Validate user if id provided
#
if ($query->param('pwd­') ne undef) {
if ($cfg->get('admpwd'­) ne $query->param('pwd'­)) {
login();
}
} elsif ($cfg->get('admpwd'­) ne undef) {
login();
} else {
runsetup(); # Just to make sure.
}
#
# Execute command
#
my $cmd = $query->param('cmd'­);
$cmd = 'setup1' if $cmd eq undef;
if ($cmd eq 'setup1') {
TTXMSSQLSetup::setu­p1($cfg, $query);
} elsif ($cmd eq 'login') {
dologin();
}

footer();

#==================­====================­====================­=============
dologin

sub dologin {
my $error;
if ($query->param('do'­)) {
if ($query->param('pas­swd') eq undef || $query->param('pass­wd') ne
$cfg->get('admpwd')­) {
$error = "Invalid password";
} else {
$query->param(-name­ => 'pwd', -value => $query->param('pass­wd'));
$query->param(-name­ => 'do', -value => '');
TTXMSSQLSetup::setu­p1($cfg, $query);
return;
}
}
$error = "<br><font color=red><b>Error:­ $error</b></font><b­r><br>" if
$error ne undef;
print <<EOT;
<center><b>Please login</b>
<br><br>$error
<table cellpadding=3>
<form action=$ENV{SCRIPT_­NAME} method=post>
<input type=hidden name=cmd value=login>
<input type=hidden name=do value=1>
<tr>
<td align=left class=lbl>Administr­ator password</td>
<td align=left><input type=password name=passwd></td>
</tr>
<tr>
<td colspan=2 align=right>
<input type=submit>
</td>
</tr>
</form>
</table>
</center>
EOT
}
#==================­====================­====================­=============
== login

sub login {
$query->param(-name­ => 'pwd', -value => '');
$query->param(-name­ => 'cmd', -value => 'login');
}

#==================­====================­====================­============
runsetup

sub runsetup {
print <<EOT;
<html>
<head><title>Troubl­e Ticket Express</title></he­ad>
<body>
<br><br><center>
<b><font color=red>Error reading configuration file.</font></b>
<br><br>
Please execute <a href=setup.cgi><b>M­ain Setup Utility</b></a> first.
</center>
</body>
</html>
EOT
exit;
}
#==================­====================­====================­==========
fatalerror

sub fatalerror {
print <<EOT;
<html>
<head><title>Troubl­e Ticket Express</title></he­ad>
<body>
<br><center><h1>Fat­al Error: $_[0]</h1>
</body>
</html>
EOT
exit;
}

sub header {
print <<EOT;
<html>
<head>
<title>
Trouble Ticket Express - MS SQL Server Module Setup
</title>
<style type="text/css">
body, td { font-family: Verdana, Helvetica, sans-serif; font-size:
10pt;}
A { color : #2E3197; text-decoration : none; }
A:Hover { color : #C00; text-decoration : underline;}
.sm {font-size: 8pt;}
.tiny {font-size: 4pt;}
.heading {font-size: 13pt;font-weight: 700; color: #2E3197;}
.lbl {font-size: 9pt;font-weight: 700;}
</style>
</head>
<body>
<center>
<table width=700>
<tr>
<td align=left>
EOT
}
#
===================­====================­====================­============
footer

sub footer {
print <<EOT;
</td></tr>
</table>
<br><br>
rev. $VERSION.$REVISION
</center>
</body>
</html>
EOT
}

-----Original Message-----
From: Steven Perreau [mailto:steven@cns.co.nz]
Sent: Tuesday, 13 May 2008 8:01 a.m.
To: dbi-users@perl.org
Subject: Cannot see AND Windows system DSN's using DBD-ODBC

Hello.



I'm having terrible trouble with www.troubleticketex­press.com
<http://www.trouble­ticketexpress.com/> getting their SQL module to
work. I have done a support case with them, they say it's a permissions
issue and not their script helpdesk support software.



I am running MS SBS on Windows 2003 SP2

IIS 6.0

SQL 2000 with SP4

DBD-ODBC V1.15

ActivePerl V5.10.0.1002



I have a DB created in SQL.

I have an ODBC System DSN created using MS Control Panel (in there a few
of them for other things already)

The ODBC DSN works fine and tests ok inside control panel.



I have tried lots of options for the IIS Aplication Pools, using Local
Service, Local System, specified account, making sure that account has
DB_OWNER access and a correct MS logon inside SQL...



I just don't know where to go.





The perl script reports:

Error: No ODBC DSN records found on this server.
Please configure DSN prior to running this program.





Which is rubbish... but obviously it cannot seen ANY of the 5+ System
DSN's that are present.



What am I doing wrong?





Regards,


Steven Perreau




Add comment
Martin Evans 13 May 2008 11:57:26 permanent link ]
 Steven Perreau wrote:
Hello.
I'm having terrible trouble with www.troubleticketex­press.com
<http://www.trouble­ticketexpress.com/> getting their SQL module to
work. I have done a support case with them, they say it's a permissions
issue and not their script helpdesk support software.
I am running MS SBS on Windows 2003 SP2
IIS 6.0
SQL 2000 with SP4
DBD-ODBC V1.15
ActivePerl V5.10.0.1002
I have a DB created in SQL.
I have an ODBC System DSN created using MS Control Panel (in there a few
of them for other things already)
The ODBC DSN works fine and tests ok inside control panel.
I have tried lots of options for the IIS Aplication Pools, using Local
Service, Local System, specified account, making sure that account has
DB_OWNER access and a correct MS logon inside SQL...
I just don't know where to go.
The perl script reports:
Error: No ODBC DSN records found on this server.
Please configure DSN prior to running this program.
Which is rubbish... but obviously it cannot seen ANY of the 5+ System
DSN's that are present.
What am I doing wrong?
Regards,
Steven Perreau

Is this a 64 bit windows machine? I only ask because on 64 bit windows
there are 2 driver managers and 2 lists of system dsns. If you are using
32-bit code you need to define the DSNs with the 32-bit ODBC driver
manager and vice versa.

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

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Perl web-programming > Cannot see AND Windows system DSN's using DBD-ODBC 13 May 2008 00:29:08

see also:
[Clustering/JBoss] - Re: Unknown…
[Installation, Configuration &…
Working with Document
пройди тесты:
see also:
Konichi-wa
)))))))))))))))))))))
Extol for you

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .