ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Datasource not found

Post new topic  Reply to topic
 Datasource not found « View previous topic :: View next topic » 
Author Message
mjain100
PostPosted: Thu Jul 14, 2011 7:55 am    Post subject: Reply with quote

Newbie

Joined: 14 Jul 2011
Posts: 2

Hi,

I have gone thourgh the thread throughly and have used Passthru function in exactly same manner, still it throws error "[Data Direct] Datasource not found and no default driver specified". I have also specifed a datasource in Compute node property from where I am invoking library function which calls Passthru, in which case it will always connect the one specifed in the node property and ignore the one I am using dynamically in code. Attached code snippet for reference....I have also verified that all the variables are having expected values...any suggestion in this regard will help me a lot.
Thank you so much in advance!!

[CREATE PROCEDURE cDatabaseRead(IN SQL_STATEMENT CHAR, IN THROW_IF_NO_ROWS_FOUND BOOLEAN, IN ERR_CODE CHAR, IN DB_IN_PARAMS REFERENCE, IN DB_OUT_PARAMS REFERENCE, IN RESULT_BRANCH_NAME CHAR) BEGIN

DECLARE noRowsRef REFERENCE TO DB_IN_PARAMS;
DECLARE DSN_VAL NAME 'RIS_DB1';

-- Perform Database Passthru Statement
SET DB_OUT_PARAMS.{RESULT_BRANCH_NAME}[] = Passthru(SQL_STATEMENT TO Database.DSN_VAL values (DB_IN_PARAMS.[]));

-- Check for non-zero SQLCODE or no rows found
Move noRowsRef To DB_OUT_PARAMS.{RESULT_BRANCH_NAME}[1];

-- There were no rows found
IF (SQLCODE <> 0) OR (THROW_IF_NO_ROWS_FOUND AND (LastMove(noRowsRef) = FALSE)) THEN

-- Build string of input parameters
DECLARE DB_IN_PARAMS_STRING CHAR '';

For dipRef As DB_IN_PARAMS.*[] Do
SET DB_IN_PARAMS_STRING = DB_IN_PARAMS_STRING || CAST(Coalesce(dipRef,'NULL') as CHAR) || ',';
End For;

SET DB_IN_PARAMS_STRING = TRIM(TRAILING ',' From DB_IN_PARAMS_STRING);

IF (SQLCODE <> 0) THEN

THROW USER EXCEPTION VALUES(
'BEM',
'FAILED: Data exception',
ERR_CODE,
'BEM',
Left(SQL_STATEMENT, 1000),
SQLCODE,SQLERRORTEXT,SQLSTATE,SQLNATIVEERROR,
DB_IN_PARAMS_STRING);

ELSE

THROW USER EXCEPTION VALUES(
'BEM',
'FAILED: No Rows Found',
ERR_CODE,
'BEM',
Left(SQL_STATEMENT, 1000),
SQLCODE,SQLERRORTEXT,SQLSTATE,SQLNATIVEERROR,
DB_IN_PARAMS_STRING);

END IF;

END IF;

END;][/code]
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 14, 2011 8:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Split from this partially relevant thread
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 14, 2011 8:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mjain100 wrote:
I have also specifed a datasource in Compute node property from where I am invoking library function which calls Passthru, in which case it will always connect the one specifed in the node property and ignore the one I am using dynamically in code.


Really? I never knew it did that. I'd welcome a link.

I'd also be interested to know what you've done to verify the datasource the code is referencing (however it determines it) is working properly and what driver it's using.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Datasource not found
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.