Re: NEED TO CALL AS400 S.P

From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 06/29/04


Date: Tue, 29 Jun 2004 22:43:53 +0000 (UTC)

Phil (Phil@discussions.microsoft.com) writes:
> The stored procedure doesn't return any records as it only does inserts
> and updates. I have been unsuccessfully trying to devise a method to
> 'fool' the OPENQUERY. :(

Well, OPENQUERY is definitely a dead end. (Unless you could add a dummy
result set.)

> *****EXEC as4cs01..as4cs01.qgpl.sp_run
> RETURNS:
> The procedure name 'as4cs01..as4cs01.qgpl.' contains more than the
> maximum number of prefixes. The maximum is 3.

So that is a plain syntax error.

> *****EXEC as4cs01.as4cs01.qgpl.sp_run
> RETURNS:
> Server: Msg 7212, Level 17, State 1, Line 1
> Could not execute procedure 'a2' on remote server 'as4cs01'.
> [OLE/DB provider returned message: SQL0104: Token { was not valid. Valid
> tokens: ( END SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER BEGIN CLOSE.
> Cause . . . . . :

Gosh! What an error message! I'm afraid that I am completely lost
here. Something appears to go very wrong where, and I have a feeling
that it takes some knowledge about AS400 to understand why. Is there
a tool on AS400 corresponding to Profiler that you could run to see
what your OLE DB provider is feed the AS400 with?

One thing strikes me as funny, and that is that the error messages
says 'a2' and not 'sp_run'. Could the OLE DB provider be generating
some temporary stored procedure?

I think you may need a forum with some knowledge about this
IBMDA400 provider. Maybe there are alternative providers you can use?

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: Foxpro vs SQL Server
    ... "OLE DB Provider for Visual FoxPro". ... These apply to any Stored Procedure your write! ... While there is a newer one that comes with the VFP 9.0 public beta, ...
    (microsoft.public.fox.vfp.queries-sql)
  • Re: NEED TO CALL AS400 S.P
    ... "Erland Sommarskog" wrote: ... >> The stored procedure doesn't return any records as it only does inserts ... What an error message! ... > what your OLE DB provider is feed the AS400 with? ...
    (microsoft.public.data.oledb)
  • Re: A DLL gone bad ?
    ... Jet 3.51 OLE DB Provider - doesn't work ... next tab without generating an error message. ...
    (microsoft.public.vb.general.discussion)
  • unable to retrieve FileIndex for certain files.
    ... OLE DB provider 'MSIDXS'. ... FileIndex - almost all files - except those failing come thru... ...
    (microsoft.public.inetserver.indexserver)
  • Re: Question on Posting data in ADODataSet
    ... The OLE DB ... > Provider is "Microsoft OLE DB Provider for ODBC Drivers' I found that ... > The error message is the following: ...
    (borland.public.delphi.database.ado)

Loading