Click here to Skip to main content
15,913,296 members
Home / Discussions / Database
   

Database

 
AnswerRe: changing the field of database based on changes in repeater Pin
Mycroft Holmes19-Jan-15 23:57
professionalMycroft Holmes19-Jan-15 23:57 
QuestionDB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 2:59
sudevsu16-Jan-15 2:59 
QuestionRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 3:10
professionalGuyThiebaut16-Jan-15 3:10 
AnswerRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 3:22
sudevsu16-Jan-15 3:22 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 3:46
professionalGuyThiebaut16-Jan-15 3:46 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 3:55
sudevsu16-Jan-15 3:55 
AnswerRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 3:21
sudevsu16-Jan-15 3:21 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 3:59
professionalGuyThiebaut16-Jan-15 3:59 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:30
sudevsu16-Jan-15 4:30 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 4:41
professionalGuyThiebaut16-Jan-15 4:41 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:43
sudevsu16-Jan-15 4:43 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 4:48
professionalGuyThiebaut16-Jan-15 4:48 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:50
sudevsu16-Jan-15 4:50 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 5:05
professionalGuyThiebaut16-Jan-15 5:05 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 5:09
sudevsu16-Jan-15 5:09 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 5:10
professionalGuyThiebaut16-Jan-15 5:10 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 5:17
sudevsu16-Jan-15 5:17 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 5:19
professionalGuyThiebaut16-Jan-15 5:19 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 5:23
sudevsu16-Jan-15 5:23 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:48
sudevsu16-Jan-15 4:48 
GeneralRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut16-Jan-15 4:55
professionalGuyThiebaut16-Jan-15 4:55 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 5:07
sudevsu16-Jan-15 5:07 
AnswerRe: DB2 Store procedure error in VB.NET Pin
Jörgen Andersson16-Jan-15 4:01
professionalJörgen Andersson16-Jan-15 4:01 
QuestionRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:32
sudevsu16-Jan-15 4:32 
AnswerRe: DB2 Store procedure error in VB.NET Pin
Jörgen Andersson16-Jan-15 9:59
professionalJörgen Andersson16-Jan-15 9:59 
Not in the procedure just remove them like this:
SQL
INSERT INTO DEVSUSH . CLCUSINF ( CICID , CIFN , CILN , CIADDR , CICITY , CISTATE , CIZIP , CIPHONE , CIEMAIL , CICLDATE )
VALUES ( PRMCICID , PRMCIFN , PRMCILN , PRMCIADDR , PRMCICITY , PRMCISTATE , PRMCIZIP , PRMCIPHONE , PRMCIEMAIL , PRMCICLDATE ) ; 

But your call from vb.net to the database is a prepared statement so that should be changed to:
VB
Try
    Dim cm As New iDB2Command("CALL DEVSUSH.SP_CUSTINFO(:PrmCICID,:PrmCIFN,:PrmCILN,:PrmCIADDR,:PrmCICITY,:PrmCISTATE,:PrmCIZIP,:PrmCIPHONE,:PrmCIEMAIL,:PrmCICLDATE)", Cn)
    strCIPHONE = strCIPHONE.Replace("-", "")
    cm.Parameters.Add("PRMCICID", iDB2DbType.iDB2Numeric).Value = Convert.ToInt32(strCICID)
    cm.Parameters.Add("PrmCIFN", iDB2DbType.iDB2VarChar).Value = strCIFN
    cm.Parameters.Add("PrmCILN", iDB2DbType.iDB2VarChar).Value = strCILN
    cm.Parameters.Add("PrmCIADDR", iDB2DbType.iDB2VarChar).Value = strCIADDR
    cm.Parameters.Add("PrmCICITY", iDB2DbType.iDB2VarChar).Value = strCICITY
    cm.Parameters.Add("PrmCISTATE", iDB2DbType.iDB2VarChar).Value = strCISTATE
    cm.Parameters.Add("PrmCIZIP", iDB2DbType.iDB2Numeric).Value = Convert.ToInt32(strCIZIP)
    cm.Parameters.Add("PrmCIPHONE", iDB2DbType.iDB2Numeric).Value = Convert.ToInt64(strCIPHONE)
    cm.Parameters.Add("PrmCIEMAIL", iDB2DbType.iDB2VarChar).Value = strCIEMAIL
    cm.Parameters.Add("PrmCICLDATE", iDB2DbType.iDB2Date).Value = strCICLDATE
    cm.ExecuteNonQuery()
Catch ex As Exception
    LogError.LogErrorIntoTextFile(ex, "InsertCust")
End Try


Should note that the error message you're getting is not from DB2 but from VB.Net, stating that there is a mismatch in the parameters. Or rather that it can't find an overload of the procedure having the right parameters.
The reason it works is that it tries to apply the parameters in the order they've been added like as if you had used ? as a marker. Like this:
VB
Dim cm As New iDB2Command("CALL DEVSUSH.SP_CUSTINFO(?,?,?,?,?,?,?,?,?,?)", Cn)

Wrong is evil and must be defeated. - Jeff Ello

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.