By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,910 Members | 1,848 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,910 IT Pros & Developers. It's quick & easy.

Getting exception while calling db2 stored proc in

P: 1
Expand|Select|Wrap|Line Numbers
  1. dim cn as odbcconnection
  2. Try
  3.  cn = New odbcconnection("###")
  4.  Dim mystring as String = "sp_name"
  6. ' connection established successfully
  8.  Dim cmd as odbccommand = New odbccommand(mystring,cn)
  9.  cmd.commandType = commandType.storedProcedure
  11.  Dim dr As odbcdatareader = cmd.executereader()
' Getting Exception here :An unexpected token "PRRDW" was found 'following"".Expected token may include "<ERR_STMT>" SQL STATE = 42601
Jun 27 '19 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,397
There's no way for us to adequately troubleshoot this code with what you have provided... for example:
Dim cmd as odbccommand = New odbccommand(mystring,cn)
What is the value of "mystring"?

Usually these types of errors are the result of a malformed string and that is where I suggest you start your troubleshooting.
Jun 28 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.