Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New SQL Server Connection doesn't work 1

Status
Not open for further replies.

TTMTech

Programmer
Feb 5, 2003
29
US
Hi !

We have installed new SQL Server and copy databases into new server. username and password is correct.I changed one line of code in index.pl (on windows2000)file as below.

for old server (servername is GREATPLAINS):

my $dbh = DBI->connect('dbi:ODBC:driver={SQL Server};Server=GREATPLAINS; database=ResourceCenterDevel;uid=rescenter;pwd=rescenter$$;');

for New server(servername is STING) :

my $dbh = DBI->connect('dbi:ODBC:driver={SQL Server};Server=STING; database=ResourceCenterDevel;uid=ramesh;pwd=ramesh;');

as soon as i hit the web page. It gives following error message on browser:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

What could be the reason ? Do i need to configure my web server or sql sever ? please help me.
 
You should have some more useful error messages in the server log somewhere. If not, try
use CGI::Carp qw(fatalsToBrowser);

You are trying to use ODBC as the connection protocol: have you verified that the ODBC DSN works? You can usually test this from within the control panel ODBC applet. Perl will never connect if the underlying ODBC cannot.

If that doesn't work, run your CGI app from the command line and then with perl -d to see exactly where it is falling over.
 
Hi TTMTech,

Try putting something like this towards the top of your script:

use DBI;

use CGI qw( :all );
use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

LelandJ Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Has anyone encountered this error before. I am a newbie trying to debug this error. I checked the log file, and did not see any errors.

Software Error:

Can't open ODBC driver for TCPROD. Reason given: Result too large.

The database is on SQL Server Version 7. The problem is intermitent.

Any ideas would be highly appreciated. Thanks in advance.

Jawa
 
Jawa,

Welcome, you should use a new thread for a query like this especially as it is unrelated to the problem above.

Try running the same query in the SQL Server console to get an idea of how large the returned dataset is. It could be that a malformed SQL statement is returning a Cartesian product instead of what should be a fairly small recordset

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top