Solved

vb6 times out while running a backup stored procedure

Posted on 2010-11-24
5
410 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:JDL129
5 Comments
 
LVL 23

Expert Comment

by:Rajkumar Gs
Comment Utility
What is the Timeout value now ? Try increase it.

Raj
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 125 total points
Comment Utility
You should look into the code of that fnADOExecuteSP_RS function.  Try to increase the Timeout setting on the Command and Connection objects...
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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
 
LVL 35

Expert Comment

by:David Todd
Comment Utility
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
 

Author Closing Comment

by:JDL129
Comment Utility
Increasing the timeout in the function did the trick!!!
Thanks to all responded!!!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now