Results 1 to 4 of 4

Thread: store procedure not run in vb 6 code

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    2

    Post store procedure not run in vb 6 code

    Hi ,I have problem in vb 6.0 code.Actually one store procedure not execute in elseif condition in vb when i am trying to execute but no error.but it manually run in sql analyzer but through vb code it is running. i am writing this code following :
    private sub cmdprocess_click()
    Try :
    Code:
    On error goto catch
    dim result as integer
    cnn.commandtimeout=300
    result=msgbox("do you wisht o process results" & vbcrlf &" modifications in the marks and cutoff will be locked",vbinformation+vbyesno)
    if result=vbyes then
    cmdprocess.enabled=false
    frame2.visible=true
    label13.caption="please wait while the results are being processed"
    label3.refresh
    progressbar1.value=progressbar1.value+10
    if(cmbexamname.text="partB") THEN
    StrSql="sp_insertresultPartB
    elseif(cmbexamname.text="PartD") then
    strsql="sp_insertresultPartD"
    elseif(cmbexamname.text="DSSC/TSOC") then
    strsql="sp_Entercimarks"
    cnn.execute strsql
    strsql="sp_scanningdssc"
    end if
    progressbar1.value=progressbar1.value+30
    cnn.execute strsql
    end if
    in the above only sp_scanningdssc is not execute.control not reach at sp_scanningdssc.i think i am missing something.please help.its urgent
    Last edited by si_the_geek; Feb 19th, 2009 at 07:22 AM. Reason: added Code tags

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: store procedure not run in vb 6 code

    Thread moved from the FAQ forum, which is not the place to post your questions.

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: store procedure not run in vb 6 code

    You should check if your conditions are met so they are executed or reached.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657

    Re: store procedure not run in vb 6 code

    Can we see the rest of your code ?

    Where you make your db connection for instance ?

    Although you can just execute your code straight off the Connection object you would be better of using a command object, where you can set the type of SQL Command you are executing.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width