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

Getting exception while calling db2 stored proc in vb.net

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"
  5.  
  6.  cn.open() ' connection established successfully
  7.  
  8.  Dim cmd as odbccommand = New odbccommand(mystring,cn)
  9.  cmd.commandType = commandType.storedProcedure
  10.  
  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
3 Weeks Ago #1
Share this Question
Share on Google+
1 Reply


zmbd
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.
3 Weeks Ago #2

Post your reply

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