Click here to Skip to main content
15,354,423 members
Home / Discussions / Database
   

Database

 
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
Membersudevsu16-Jan-15 5:23 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu16-Jan-15 4:48
Membersudevsu16-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
Membersudevsu16-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
Membersudevsu16-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

AnswerRe: DB2 Store procedure error in VB.NET Pin
Mycroft Holmes16-Jan-15 13:13
professionalMycroft Holmes16-Jan-15 13:13 
AnswerRe: DB2 Store procedure error in VB.NET Pin
GuyThiebaut18-Jan-15 21:47
professionalGuyThiebaut18-Jan-15 21:47 
GeneralRe: DB2 Store procedure error in VB.NET Pin
sudevsu19-Jan-15 2:37
Membersudevsu19-Jan-15 2:37 
QuestionUser name changed in active directory, SQL Server shows old user name - FIXED! Pin
GuyThiebaut15-Jan-15 8:14
professionalGuyThiebaut15-Jan-15 8:14 
AnswerRe: User name changed in active directory, SQL Server shows old user name Pin
Richard Deeming15-Jan-15 8:55
mveRichard Deeming15-Jan-15 8:55 
GeneralRe: User name changed in active directory, SQL Server shows old user name Pin
GuyThiebaut15-Jan-15 9:01
professionalGuyThiebaut15-Jan-15 9:01 
GeneralRe: User name changed in active directory, SQL Server shows old user name Pin
Richard Deeming15-Jan-15 9:18
mveRichard Deeming15-Jan-15 9:18 
GeneralRe: User name changed in active directory, SQL Server shows old user name Pin
GuyThiebaut15-Jan-15 9:22
professionalGuyThiebaut15-Jan-15 9:22 
AnswerSUCCESS! Pin
GuyThiebaut15-Jan-15 22:37
professionalGuyThiebaut15-Jan-15 22:37 
QuestionIsolation Level Pin
Member 1137363813-Jan-15 19:07
MemberMember 1137363813-Jan-15 19:07 
AnswerRe: Isolation Level Pin
Eddy Vluggen13-Jan-15 23:44
professionalEddy Vluggen13-Jan-15 23:44 
GeneralRe: Isolation Level Pin
Member 1137363814-Jan-15 0:30
MemberMember 1137363814-Jan-15 0:30 
GeneralRe: Isolation Level Pin
Eddy Vluggen14-Jan-15 2:56
professionalEddy Vluggen14-Jan-15 2:56 
GeneralRe: Isolation Level Pin
Member 1137363814-Jan-15 16:57
MemberMember 1137363814-Jan-15 16:57 
AnswerRe: Isolation Level Pin
Eddy Vluggen15-Jan-15 9:56
professionalEddy Vluggen15-Jan-15 9:56 
GeneralRe: Isolation Level Pin
Member 1137363815-Jan-15 17:15
MemberMember 1137363815-Jan-15 17:15 
GeneralRe: Isolation Level Pin
Eddy Vluggen16-Jan-15 7:58
professionalEddy Vluggen16-Jan-15 7:58 

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.