|
 |
pro_vb thread: DBConnectivity problem???
Message #1 by "NaveenG" <naveeng@s...> on Sat, 26 Jan 2002 19:34:32 +0530
|
|
Right but if you are using Oracle, ADO and the ADO transaction function without using MTS - the provider
" for Oracle uses an auto-commit transaction mode, where each discrete action on a consumer session comprises a complete transaction
against an Oracle server" according to MSDN
Also nested transactions are not supported directly without using oracle's SavePoint
I thought (perhaps wrongly) that NaveenG was implementing his appl this way in which case I am sorry for misinformation.
> -----Original Message-----
> From: Harshang Pandya [SMTP:harshangp@y...]
> Sent: Monday, January 28, 2002 10:55 AM
> To: professional vb
> Subject: [pro_vb] RE: DBConnectivity problem???
>
> ADO 2.5 does support transaction. If you are using
> MTS, check for any error or memory leaks on MTS or
> check which application is using more resources
>
>
> --- NaveenG <naveeng@s...> wrote:
> > I'm using oraoleDB to upload images to the database.
> > As MSDAORA doesn't
> > support storing BLOB. ADO 2.5 doesn't support
> > transactions??? Is it only
> > with OraoleDB provider or with MSDAORA also?
> > -Nav
> > ----- Original Message -----
> > From: Cremieux, Judith K.
> > <Judith.Cremieux@i...>
> > To: professional vb <pro_vb@p...>
> > Sent: Monday, January 28, 2002 9:24 PM
> > Subject: [pro_vb] RE: DBConnectivity problem???
> >
> >
> > > I don't know that we can help since we are using
> > MSDAORA as the provider.
> > Since we discovered transactions or rather rollbacks
> > aren't supported for us
> > with ADO2.5 and Oracle 8 we have had to put anything
> > that needs a rollback
> > in a procedure and then have the procedure fail or
> > succeed.
> > > Your settings seem fine. So far we have not seen
> > the IIS slowdown. We do
> > know that we can wait forever trying to connect if
> > we do not do it async -
> > ADO timeout periods are not recognized.
> > > If you are sure that transactions and timeout
> > periods are working for you
> > perhaps we should be following you!
> > >
> > > > -----Original Message-----
> > > > From: NaveenG [SMTP:naveeng@s...]
> > > > Sent: Monday, January 28, 2002 9:18 AM
> > > > To: professional vb
> > > > Subject: [pro_vb] RE: DBConnectivity problem???
> > > >
> > > > I'm using Win-NT for development and Windows
> > 2000 server for deployment.
> > > > If the query for update (execQueryToUpdate
> > subroutine) fails (because of
> > > > invalid column name/data type/SQL query syntax),
> > IIS slows down and
> > after
> > > > sometime failing to serve. I'm getting ASP error
> > also after sometime.
> > > > Any specific properties do I have to set in the
> > VB COM component? I'm
> > having
> > > > Appartment threaded model, Unattended execution,
> > Upgrade ActiveX
> > > > controls,Retain in Memory options
> > checked.Version compatibility set to
> > > > binary.
> > > > I'm having one more subroutine to update
> > multiple queries in one
> > transaction
> > > > and writing all the queries to a file to debug.
> > Please go thro' this
> > > > subroutine and let me know if there is any
> > wrong.
> > > >
> > > > Sub execMultipleQueriesToUpdate(ByVal
> > iQueryCount As Integer, _
> > > > ByRef
> > qryStringArray As Variant, _
> > > > ByRef sSuccess
> > As Variant)
> > > >
> > > > Dim sAppName As String
> > > > Dim sConn As String
> > > > Dim oABData As Object
> > > > Dim conDBMDAMtplRecords
> > > > Dim iDBError As Integer
> > > > Dim iRow As Integer
> > > >
> > > > On Error GoTo OnError
> > > >
> > > > sDBConnection
> > "Provider=OraOLEDB.Oracle;Data Source=grstest;User
> > > > Id=scott;Password=tiger"
> > > >
> > > > Set conDBMDAMtplRecords
> > CreateObject("ADODB.Connection")
> > > > conDBMDAMtplRecords.ConnectionTimeout
> > 0
> > > >
> > > > conDBMDAMtplRecords.Open sConn
> > > > conDBMDAMtplRecords.BeginTrans
> > > >
> > > > If UBound(qryStringArray) = 0 Then
> > > > If qryStringArray(0) <> "" Then
> > > > conDBMDAMtplRecords.Execute
> > qryStringArray(0)
> > > > End If
> > > >
> > > > Else
> > > > Dim fso, tf
> > > > Set fso
> > CreateObject("Scripting.FileSystemObject")
> > > > Set tf
> > fso.CreateTextFile("c:\exectestfile.txt", True)
> > > >
> > > > For iRow = LBound(qryStringArray) To
> > iQueryCount
> > > >
> > > > If qryStringArray(iRow) <> ""
> > Then
> > > > tf.WriteLine
> > (qryStringArray(iRow))
> > > > conDBMDAMtplRecords.Execute
> > qryStringArray(iRow)
> > > > tf.WriteBlankLines (3)
> > > >
> > > > End If
> > > >
> > > > Next
> > > > End If
> > > >
> > > > iDBError
> > conDBMDAMtplRecords.Errors.Count
> > > >
> > > > If iDBError = 0 Then
> > > > sSuccess = True
> > > > tf.WriteLine ("Done")
> > > > conDBMDAMtplRecords.CommitTrans
> > > > Else
> > > > sSuccess = False
> > > > tf.WriteLine ("Failed")
> > > > conDBMDAMtplRecords.RollbackTrans
> > > > End If
> > > > tf.Close
> > > > conDBMDAMtplRecords.Close
> > > >
> > > > Exit Sub
> > > > OnError:
> > > >
> > > > sSuccess = False
> > > > tf.WriteLine ("Failed")
> > > > tf.Close
> > > > conDBMDAMtplRecords.RollbackTrans
> > > > If (Not conDBMDAMtplRecords = Null) Then
> > > > conDBMDAMtplRecords.Close
> > > > Set conDBMDAMtplRecords = Nothing
> > > > End If
> > > >
> > > > End Sub
> > > > Thanks in advance,
> > > > -Nav
> > > > ----- Original Message -----
> > > > From: Cremieux, Judith K.
> > <Judith.Cremieux@i...>
> > > > To: professional vb <pro_vb@p...>
> > > > Sent: Monday, January 28, 2002 8:15 PM
> > > > Subject: [pro_vb] RE: DBConnectivity problem???>
> > > >
> > > >
> > > > > I'm sorry Naveen my last reply was for
> > Shreekar and disconnected
> > > > recordsets. As to your problem, our experience
> > with Oracle and ADO has
> > > > taught us to connect async and wait and retry
> > for period of time to
> > avoid
> > > > waiting almost indefinitely and some other
> > issues. Time out period
> > > > adjustments and other parm values do not effect
> > the behavior. We have
> > > > tracked this down with the DBA here. What error
> > are you getting exactly?
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: NaveenG [SMTP:naveeng@s...]
> > > > > > Sent: Saturday, January 26, 2002 8:05 AM
> > > > > > To: professional vb
> > > > > > Subject: [pro_vb] DBConnectivity problem???
> > > > > >
> > > > > > I'm using Oraoledb.oracle provider to
> > connect to the database from
> > > > ASP(IIS 5.0).
> > > > > > Sometimes it is failing to connect to the
> > database. I'm using MDAC
> > 2.5.
> > > > > > Here are the subroutines to query and update
> > DB. Please tell me
> > where
> > > > I'm wrong.
> > > > > >
> > > > > > Sub execQueryForArray(ByVal sSQL As String,
> > _
> > > > > > ByRef arrOfRecords
> > As Variant, _
> > > > > > ByRef bResult As
> > Variant)
> > > > > >
> > > > > > On Error GoTo errHandler
> > > > > > Dim oResultSet As Object
> > > > > > Dim oConn As Object
> > > > > > Dim oRst As Object
> > > > > > Dim oParam As Object
> > > > > > Dim iCount As Integer
> > > > > > Dim lRecCount As Integer
> > > > > > Dim sAppName As String
> > > > > > Dim sDBConnection As String
> > > > > >
> > > > > > sDBConnection
> > "Provider=OraOLEDB.Oracle;Data
> > Source=grstest;User
> > > > Id=scott;Password=tiger"
> > > > > > Set oConn
> > CreateObject("ADODB.Connection")>
> > > > > > oConn.ConnectionTimeout = 0
> > > > > > oConn.Open sDBConnection
> > > > > >
> > > > > > Set oResultSet
> > CreateObject("ADODB.Recordset")
> > > > > >
> > > > > > oResultSet.Open sSQL, oConn,
> > adOpenForwardOnly, adLockReadOnly,
> > > > adCmdText
> > > > > > If Not oResultSet.EOF Then
> > > > > > arrOfRecords = oResultSet.GetRows()
> > > > > > End If
> > > > > > oResultSet.Close
> > > > > > Set oResultSet = Nothing
> > > > > > oConn.Close
> > > > > > Set oConn = Nothing
> > > > > > bResult = True
> > > > > > Exit Sub
> > > > > > errHandler:
> > > > > > If (Not oConn = Null) Then
> > > > > > oConn.Close
> > > > > > Set oConn = Nothing
> > > > > > End If
> > > > > > bResult = False
> > > > > >
> > > > > > End Sub
> > > > > >
> > > > > > Sub execQueryToUpdate(ByVal sSQLQuery As
> > String, _
> > > > > > ByRef
> > lRecCount As Variant)
> > > > > > On Error GoTo errorHandler
> > > > > > Dim iRecCount As Long
> > > > > > Dim oCmd As Object
> > > > > > Dim oConn As Object
> > > > > > Dim oRst As Object
> > > > > > Dim oParam As Object
> > > > > > Dim iCount As Integer
> > > > > > Dim sAppName As String
> > > > > > Dim sDBConnection As String
> > > > > > Dim oABData As Object
> > > > > > Dim lResult As Long
> > > > > > Dim iDBError As Integer
> > > > > >
> > > > > > sDBConnection
> > "Provider=OraOLEDB.Oracle;Data
> > Source=grstest;User
> > > > Id=scott;Password=tiger"
> > > > > >
> > > > > > Set oConn
> > CreateObject("ADODB.Connection")
> > > > > > oConn.ConnectionTimeout = 0
> > > > > > oConn.Open sDBConnection
> > > > > >
> > > > > > oConn.BeginTrans
> > > > > > oConn.Execute sSQLQuery
> > > > > > lRecCount = 1
> > > > > > oConn.CommitTrans
> > > > > > oConn.Close
> > > > > > Set oConn = Nothing
> > > > > >
> > > > > > Exit Sub
> > > > > > errorHandler:
> > > > > > If (Not oConn = Null) Then
> > > > > > oConn.RollbackTrans
> > > > > > oConn.Close
> > > > > > Set oConn = Nothing
> > > > > > End If
> > > > > > lRecCount = -1
> > > > > >
> > > > > > End Sub
> > > > > >
> > > > > > -Nav
> > $subst('Email.Unsub').
> > > > >
> > $subst('Email.Unsub').
> > > >
> > > >
> > $subst('Email.Unsub').
> > >
> > $subst('Email.Unsub').
> >
> >
> $subst('Email.Unsub').
>
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
>
|
|
 |