The
I'm running into a problem where I use a dr.hasrows IF statement, and it's wrong Returning to form (when I am 100% positive, this is true). I am very new to both VB and IBM (SQL), but I have done the work of this order in the past.
private sub btnAdd_Click (ByVal string as the System.Object, ByVal System.EventArgs e) btnAdd.Click dim SQL handles = "* from testlib.hrcontra select where @ HRAART = HRAART and @ HRASEC = HRASEC and @ HRAPAR = HRAPAR and @ HRASEQ = HRASEQ and @ HRARED = HRARED "such as the use of new cmd iDB2Command (SQL, CN) cmd.DeriveParameters () cmd.Parameters ( "@HRAART"). Value = SCRHRAART cmd.Parameters ("@HRASEC"). Value = SCRHRASEC cmd.Parameters ("@HRAPAR") Value = SCRHRAPAR cmd.Parameters ("@ HRASEQ"). Value = SCRHRASEQ 'cmd.Parameters ("@HRARED") Value while = SCRHRARED (as iDB2DataReader = cmd.ExecuteReader dr.Read Using Dr.) If dr.HasRows = truth exists MsgBox (try "list first!") Exit end before catching sub-end , so as iDB2Exception Form1.HandleError, East) try to end out of sub-end exit (using "cmd.ExecuteReader (an error has occurred on)" what Do I need to use all the fields (even non-keys)? Or, why I can use the 4 key areas in this case (that goal). I solution is to try to work both SQL and VB.net angles and did not find it anywhere. < / Div>
Holly caps, you have re-examined me the SQL and realized that I was comparing HRRAD in my SQL I removed it from the SQL command and now it works!
Thanks, Steve!
Solution: Make sure your SQL and VB matches, children check again!
No comments:
Post a Comment