Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Connecting to MS SQL

I'm building a response rate counter using unverified perl and I'm getting an "Error # 132"
with this System Error:

DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Survey2020_passwords'. (SQL-42S02) [state was 42S02 now 42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-42000) at (eval 21) line 27, line 14.

Here's a part of my script which I think is causing the error:

require DBI;

my $server_name = 'servername';
my $server_port = 1234;
my $database_name = 'Sawtooth';
my $database_user = 'sawtooth_survey_engine';
my $database_pass = ' xxxx';
my $database_host = ' cccc';
my $con1;
my $DSN = 'Driver={SQL Server};Server=servername';
    $con1 = DBI->connect("DBI:ODBC:$DSN", $database_user, $database_pass, {RaiseError=>1,AutoCommit=>0,PrintError=>0});
if ($@)
elsif (!$con1)
    die("Failed to connect to the database!");

my $query1 = "SELECT COUNT(pw) FROM Survey2020_passwords WHERE sortID>'7000000' AND sortID<'8000000'";
my $row1 = queryrow($con1, $query1);
asked Jul 31 by Abby2020 (120 points)
I'm not a database expert by any means, but I would think you'd want to check your passwords table if you have not already.  Does the table exist?  Does it have the rows you'd expect?  Are there special permissions on it?  You could try deleting and building it again if you think something fishy might be going on with it.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.