Solved

vb6 times out while running a backup stored procedure

Posted on 2010-11-24
5
423 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
ID: 34212078
What is the Timeout value now ? Try increase it.

Raj
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 125 total points
ID: 34212080
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 47

Expert Comment

by:Vitor Montalvão
ID: 34213067
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
ID: 34213514
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
ID: 34230359
Increasing the timeout in the function did the trick!!!
Thanks to all responded!!!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 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