|
-
Feb 19th, 2009, 04:56 AM
#1
Thread Starter
New Member
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
-
Feb 19th, 2009, 07:23 AM
#2
Re: store procedure not run in vb 6 code
Thread moved from the FAQ forum, which is not the place to post your questions.
-
Feb 19th, 2009, 03:48 PM
#3
Re: store procedure not run in vb 6 code
You should check if your conditions are met so they are executed or reached.
-
Feb 20th, 2009, 10:16 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|