Click here to Skip to main content
15,905,414 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Adding unmanged code to VB.NET Pin
jzonthemtn23-Oct-08 1:11
jzonthemtn23-Oct-08 1:11 
GeneralRe: Adding unmanged code to VB.NET Pin
Nanda160523-Oct-08 1:53
Nanda160523-Oct-08 1:53 
GeneralRe: Adding unmanged code to VB.NET Pin
Dave Kreskowiak23-Oct-08 2:02
mveDave Kreskowiak23-Oct-08 2:02 
GeneralRe: Adding unmanged code to VB.NET Pin
Nanda160523-Oct-08 2:13
Nanda160523-Oct-08 2:13 
GeneralRe: Adding unmanged code to VB.NET Pin
Dave Kreskowiak23-Oct-08 3:53
mveDave Kreskowiak23-Oct-08 3:53 
Questionusing store procedure to insert selected checkboxlist values into database Pin
Mamphekgo Bahula22-Oct-08 21:55
Mamphekgo Bahula22-Oct-08 21:55 
AnswerRe: using store procedure to insert selected checkboxlist values into database Pin
TheComputerMan22-Oct-08 23:39
TheComputerMan22-Oct-08 23:39 
AnswerRe: using store procedure to insert selected checkboxlist values into database Pin
Dave Kreskowiak23-Oct-08 2:01
mveDave Kreskowiak23-Oct-08 2:01 
Is suspect your problem is here:
For Each li In ChkService.Items
    If li.Selected = True Then
        cmdStandby.Parameters.AddWithValue("@Service_id", li.Value)
    End If
Next

This loop is going through a list and checking if it's selected. For each value selected you're adding another parameter (with the same name) to the Parameters collection. If there is more than one item selected, your code is adding more than the 4 parameters to the SQL call.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




QuestionSFTP activex? Pin
hatemtaleb22-Oct-08 21:27
hatemtaleb22-Oct-08 21:27 
AnswerRe: SFTP activex? Pin
Dave Kreskowiak23-Oct-08 7:18
mveDave Kreskowiak23-Oct-08 7:18 
QuestionVariables.. Pin
Subjugate22-Oct-08 17:34
Subjugate22-Oct-08 17:34 
AnswerRe: Variables.. Pin
Rupesh Kumar Swami22-Oct-08 20:42
Rupesh Kumar Swami22-Oct-08 20:42 
AnswerRe: Variables.. Pin
Jon_Boy23-Oct-08 2:55
Jon_Boy23-Oct-08 2:55 
QuestionProblem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 12:38
TheComputerMan22-Oct-08 12:38 
AnswerRe: Problem with Drag & Drop between list boxes Pin
sumit703422-Oct-08 22:47
sumit703422-Oct-08 22:47 
GeneralRe: Problem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 23:01
TheComputerMan22-Oct-08 23:01 
GeneralRe: Problem with Drag & Drop between list boxes Pin
Mycroft Holmes22-Oct-08 23:39
professionalMycroft Holmes22-Oct-08 23:39 
GeneralRe: Problem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 23:44
TheComputerMan22-Oct-08 23:44 
QuestionDesignMode Dilemma! [modified] Pin
Saul Johnson22-Oct-08 8:49
Saul Johnson22-Oct-08 8:49 
AnswerRe: DesignMode Dilemma! Pin
Dave Kreskowiak22-Oct-08 11:43
mveDave Kreskowiak22-Oct-08 11:43 
GeneralRe: DesignMode Dilemma! Pin
Saul Johnson24-Oct-08 4:54
Saul Johnson24-Oct-08 4:54 
QuestionLinkLabels and Data Source Pin
KrisnNala22-Oct-08 8:28
KrisnNala22-Oct-08 8:28 
AnswerRe: LinkLabels and Data Source Pin
Wendelius22-Oct-08 9:40
mentorWendelius22-Oct-08 9:40 
GeneralRe: LinkLabels and Data Source Pin
KrisnNala23-Oct-08 7:08
KrisnNala23-Oct-08 7:08 
GeneralRe: LinkLabels and Data Source Pin
Wendelius23-Oct-08 7:55
mentorWendelius23-Oct-08 7:55 

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.