Click here to Skip to main content
15,891,375 members
Home / Discussions / Database
   

Database

 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay11-Sep-05 0:15
Colin Angus Mackay11-Sep-05 0:15 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay11-Sep-05 0:21
Colin Angus Mackay11-Sep-05 0:21 
GeneralRe: Stored Procedure - Verification Pin
phokojoe11-Sep-05 22:11
phokojoe11-Sep-05 22:11 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay12-Sep-05 1:55
Colin Angus Mackay12-Sep-05 1:55 
QuestionFree Databases Pin
Robert M Greene9-Sep-05 16:56
Robert M Greene9-Sep-05 16:56 
QuestionSQL Restore Mystery Pin
mjackson119-Sep-05 13:06
mjackson119-Sep-05 13:06 
AnswerRe: SQL Restore Mystery Pin
Rahul Walavalkar13-Sep-05 0:11
Rahul Walavalkar13-Sep-05 0:11 
QuestionTimeout Expired The timeout period elapsed prior to completion Pin
Jaffer Mumtaz9-Sep-05 1:22
Jaffer Mumtaz9-Sep-05 1:22 
The following function is used in my code to store PDF as BLOB in SQL Server database. When i am running my application, sometimes after the application is running for long time period and continusly updating database single field in SQL server containing millions of record it gives the following exception on

cmdSQL.ExecuteNonQuery()

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I have checked the query it does not take much time to execute againts SQL Server so please dont give me suggestion of setting timeout property of command object. I need to know why this error comes after long execution time and how can resolve it.

Your immediate response will be higly appreciated.

Protected Overrides Function PutPDFFile(ByVal strFileName As String) As Boolean
Dim cmdSQL As SqlClient.SqlCommand
Dim blnReturn As Boolean = False
Dim objParam As SqlClient.SqlParameter
Dim arrData() As Byte

Try
If Not IO.File.Exists(strFileName) Then
Throw New Exception("PDF file not found:" & strFileName)
Else
arrData = ReadFile(strFileName)
End If

cmdSQL = New SqlClient.SqlCommand("UPDATE [<job>] SET [File_Name] = @PDFName, [File] = @PDFData WHERE [File_Name] = @DATName".Replace("<job>", Me.Job.JobName), Me.m_cnnSQL)
cmdSQL.CommandType = CommandType.Text

objParam = cmdSQL.Parameters.Add("@PDFName", SqlDbType.VarChar)
objParam.Value = strFileName.Substring(strFileName.LastIndexOf(IO.Path.DirectorySeparatorChar) + 1)

objParam = cmdSQL.Parameters.Add("@PDFData", SqlDbType.Image)
objParam.Value = arrData

objParam = cmdSQL.Parameters.Add("@DATName", SqlDbType.VarChar)
objParam.Value = strFileName.Substring(strFileName.LastIndexOf(IO.Path.DirectorySeparatorChar) + 1).Replace("pdf", "dat")

cmdSQL.ExecuteNonQuery()
cmdSQL.Dispose()
blnReturn = True
Catch ex As Exception
Me.m_objLog.Log(ex.Message, SOARLogType.sltLogOnly)
Finally
If IO.File.Exists(strFileName) Then IO.File.Delete(strFileName)
cmdSQL = Nothing
End Try
Return blnReturn
End Function
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 1:51
OMalleyW9-Sep-05 1:51 
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 5:39
miah alom9-Sep-05 5:39 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Andy Brummer9-Sep-05 5:57
sitebuilderAndy Brummer9-Sep-05 5:57 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 6:12
miah alom9-Sep-05 6:12 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Andy Brummer9-Sep-05 11:28
sitebuilderAndy Brummer9-Sep-05 11:28 
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 6:48
OMalleyW9-Sep-05 6:48 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 7:04
miah alom9-Sep-05 7:04 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 7:34
OMalleyW9-Sep-05 7:34 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 7:56
miah alom9-Sep-05 7:56 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Jaffer Mumtaz11-Sep-05 19:41
Jaffer Mumtaz11-Sep-05 19:41 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW12-Sep-05 6:32
OMalleyW12-Sep-05 6:32 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Andy Brummer12-Sep-05 8:27
sitebuilderAndy Brummer12-Sep-05 8:27 
QuestionDataRow Deletion Error.Please Help Me ! Pin
User 20930738-Sep-05 21:10
User 20930738-Sep-05 21:10 
AnswerRe: DataRow Deletion Error.Please Help Me ! Pin
miah alom9-Sep-05 6:00
miah alom9-Sep-05 6:00 
GeneralRe: DataRow Deletion Error.Please Help Me ! Pin
User 20930739-Sep-05 18:41
User 20930739-Sep-05 18:41 
GeneralRe: DataRow Deletion Error.Please Help Me ! Pin
miah alom12-Sep-05 8:57
miah alom12-Sep-05 8:57 
QuestionSql Enterprise Manager Pin
smita_roy8-Sep-05 19:49
smita_roy8-Sep-05 19:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.