Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:13:46+00:00 2026-06-18T00:13:46+00:00

Getting error while executing the stored procedure from perl. I am able to connect

  • 0

Getting error while executing the stored procedure from perl. I am able to connect to the MS SQL server from perl without any issues. But when I execute the procedure with the following binding parameters I am getting the error

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ‘@id’. (SQL-42000)

this ‘id’ is the first parameter. When I look at the procedure it is fine.
Anyone have any thoughts on this error?

Code

#GetStatusDescription(?, ?, ?) - id - LONG, status - VARCHAR, description - VARCHAR
my $sth = $dbh -> prepare('exec GetStatusDescription(?, ?, ?)');
my $str1, my $str2;
my $intid = 11122;
use DBI qw(:sql_types);
$sth->bind_param(1, $intid, DBI::SQL_INTEGER); 
$sth->bind_param_inout(2, \$str1, DBI::SQL_VARCHAR); 
$sth->bind_param_inout(3, \$str2, DBI::SQL_VARCHAR); 
$sth->execute() or die $dbh -> errstr;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:13:47+00:00Added an answer on June 18, 2026 at 12:13 am

    If you’re calling to a stored procedure, those don’t take parentheses in SQL Server. that is, you want:

    my $sth = $dbh -> prepare('exec GetStatusDescription ?, ?, ?');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting error while inserting values into database (SQL Server 2008) Implicit conversion from data
I'm getting error while using replace in an update statement in sql server 2008.
I am getting the following error while executing the following query in an Stored
I am getting following error ERROR:- Incorrect syntax near '+'. while executing following T-Sql
i am getting following error while getting data from dictionary -[__NSCFString objectForKey:]: unrecognized selector
I'm getting the following error while executing database query: A Database Error Occurred Error
I am getting WatiN.Core.Exceptions.TimeoutException : Timeout while Internet Explorer busy error while executing my
I am getting this Error while executing my android application : Host is unresolved:
Hi I'm getting the error while executing following code in MySQL : BEGIN DECLARE
I'm getting a stackverflow error while executing InvokeRequired. System.StackOverflowException was unhandled How to fix

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.