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 81883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:31:47+00:00 2026-05-10T21:31:47+00:00

I am trying to execute a stored procedured from a linked database in MS

  • 0

I am trying to execute a stored procedured from a linked database in MS SQL 2005. The linked database is a db2 database on a iseries server. I am using the iSeries IBMDASQL service provider. I am able to query the stored procedure without problems using a simple vbscript and ado. When I try to execute the same stored procedure in query analyzer on the SQL Server, I never see any results. Query analyzer always show ‘command executed’ and when I execute the select * on the temp table, no values appear. What am I doing wrong????? Thanks!

–code from query analyzer below–

DECLARE @emailToAddress         char(50) DECLARE @emailFromAddress       char(50)  set @emailToAddress = 'customer.service@company.com' set @emailFromAddress = 'customer@gmail.com'  If Object_ID('tempdb..#tmpResultTbl') Is Not Null     Drop Table #tmpResultTbl  Create Table #tmpResultTbl ( OUTPGMID Char(150))  --SET FMTONLY Off Set NoCount On Insert Into #tmpResultTbl  EXEC ('CALL abicqual.VP_GETCCEPGMID(?, ?) ', @emailToAddress, @emailFromAddress) AT MAM400   Select * From #tmpResultTbl 

UPDATED: Here is the updated code to use openquery… still no luck 🙁

DECLARE @TSQL varchar(8000) DECLARE @emailToAddress varchar(50) DECLARE @emailFromAddress varchar(50) SET @emailToAddress = ‘customer.service@company.com’ SET @emailFromAddress = ‘customer@gmail.com’ SET @TSQL = ‘SELECT * FROM OPENQUERY(MAM400,”CALL abicqual.VP_GETCCEPGMID(””’ + @emailToAddress + ””’, ””’ + @emailFromAddress + ””” + ‘)”’ + ‘)’ Print @TSQL EXEC (@TSQL)

–output below– SELECT * FROM OPENQUERY(MAM400,’CALL abicqual.VP_GETCCEPGMID(”customer.service@company.com”, ”customer@gmail.com”)’) Msg 7357, Level 16, State 2, Line 1 Cannot process the object ‘CALL abicqual.VP_GETCCEPGMID(‘customer.service@company.com’, ‘customer@gmail.com’)’. The OLE DB provider ‘IBMDASQL’ for linked server ‘MAM400’ indicates that either the object has no columns or the current user does not have permissions on that object.

  • 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. 2026-05-10T21:31:48+00:00Added an answer on May 10, 2026 at 9:31 pm

    Turns out that there are a number of issues with the IBMDASQL provider that I was using. Believe it or not it is faster and more reliable to use the Microsoft OLE DB Provider for ODBC Drivers. After creating a new linked server with this provider, all of my earlier sql attempts worked properly. Cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use SQL Profiler to see the queries that… May 11, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer I came across Color Oracle and thought it might help.… May 11, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer First off, just to clarify: you should connect the text… May 11, 2026 at 11:41 pm

Related Questions

I am attempting to execute a Stored Procedure within another stored procedure. The catch
Hey all, I'm pulling my hair out on this one. I've checked all my
I've created a simple parameterless stored procedure which I've pasted below. I've imported the
I am trying to use the stored procedure mapping feature in Entity Framework to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.