vb6 times out while running a backup stored procedure

Attached is the code I am running to send the information to sqlserver to run a backup stored procedure.

I don't get an error returned (I may just not know how to get it, I have return @@Error as the next to last line in my stored procedure, the last line is END)

What can I try to make it run longer?
Thanks guys,
Jerry
frmEntry.Timer1.Enabled = False
    strParamNameList = "@BackupPath"
    strParamValueList = Me.txtPath.Text
    Call fnADOExecuteSP_RS("sp_FullBackup", strParamNameList, strParamValueList)
    If strADOErr = "OK" Then
        MsgBox "Successful Backup"
        Unload Me
    Else
        MsgBox "Backup Failed"
    End If
frmEntry.Timer1.Enabled = True

Open in new window

JDL129Asked:
Who is Participating?
 
ValentinoVConnect With a Mentor BI ConsultantCommented:
You should look into the code of that fnADOExecuteSP_RS function.  Try to increase the Timeout setting on the Command and Connection objects...
0
 
Rajkumar GsSoftware EngineerCommented:
What is the Timeout value now ? Try increase it.

Raj
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Backup operations may take hours depending on the size of the database, so you should check how much is the connection timeout property.
Can't you make it asynchronous so you don't need to wait for response?
0
 
David ToddSenior DBACommented:
Hi,

One way to make asynchronous is to create a new job/call an existing job, and monitor job's progress from job history table, or logging statements in your script.

Regards,
  David
0
 
JDL129Author Commented:
Increasing the timeout in the function did the trick!!!
Thanks to all responded!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.