Transaction Commit problem


Author
Message
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

I deploy to customer my application. On my developer machine all works fine.. and as always on customer side all goes wrong Smile

The code is simple as on example



Try

BusinessLayer.TransactionBegin("PENSOLUTIONOFFICE", lcTransactionKey, Data.IsolationLevel.ReadCommitted)

mmks_updatePSOForm(loPSOFormStoreBO)



lSaveResult = loPSOFormStoreBO.Save(True, lcTransactionKey)

If lSaveResult = MicroFour.StrataFrame.Data.SaveUndoResult.Success Then

BusinessLayer.TransactionCommit("PENSOLUTIONOFFICE", lcTransactionKey)

lcErrorMessage = "SUCCESS"

Else

Throw New Exception("An error happen during save data!")

End If

Catch ex As Exception

lcErrorMessage = ex.Message

BusinessLayer.TransactionRollback("PENSOLUTIONOFFICE", lcTransactionKey)

End Try





On customer machine BusinessLayer.TransactionCommit call an exception (free translation from german) Transaction is finised and can't be used anymore.. something like that...

The question is WHEN transaction is finished? Smile and why on my developer machine all works fine and there an exception happens.

Everywhere installed SQL Server 2008.

Any ideas

Thanks

Denis
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Denis,



I don't see anything wrong with your code. Tongue



Make sure the customer have the correct SF assemblies you have in your developer computer. w00t

Edhy Rijo

dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

I have on developer machine in GAC a little bit more registered dlls but I thinking its not a problem

On my developer machine I have

MicroFour StrataFrame AddIns

MicroFour StrataFrame Base

MicroFour StrataFrame Business

MicroFour StrataFrame DBEngine

MicroFour StrataFrame Enterprise

MicroFour StrataFrame Enterprise Client

MicroFour StrataFrame Extensibility

MicroFour StrataFrame Infragistics Wrapper

MicroFour StrataFrame Inherited UI

MicroFour StrataFrame Security

MicroFour StrataFrame UI

All assemblies version 1.6.0.0 and all dlls version 1.6.6.9



On customer machine in GAC

MicroFour StrataFrame Base

MicroFour StrataFrame Business

MicroFour StrataFrame DBEngine

MicroFour StrataFrame Enterprise

MicroFour StrataFrame Enterprise Client

MicroFour StrataFrame Security

MicroFour StrataFrame UI

All assemblies version 1.6.0.0 and all Dlls version 1.6.6.9



Seems a same ...
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Is it possible to have something diffrent in SQL Server environment for transaction support.. I am not a big expert in SQL Server.. so.. as idea...
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Are the tables structure at the customer site, the same as yours?

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Also before the save, use code like this one to debug the data that is being send to the server:



MicroFour.StrataFrame.Data.DataBasics.DataSources("").SetDebugOn("c:\DebugFile.html", True)



Edhy Rijo

dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Thanks for response

yes.. database is a same.. I copy MDF file and attach it on customer side

Save is not a problem.. it works..



the debug file:

Command #:    1

Timestamp:    2009-07-22 21:37:35.93

General Command Settings

Command Type:    Text

Object Type:    System.Data.SqlClient.SqlCommand

Connection String:    Data Source=DIGIPENDEV2;Initial Catalog=AnotoOffice;User ID=anoto;

Transaction:    True

Command Settings

CommandText:    UPDATE [dbo].[PSOFormstore] SET [mandator_id] = @mandator_id, [filename] = @filename, [formsetid] = @formsetid, [active] = @active, [validForm] = @validForm, [validto] = @validto, [offsetx] = @offsetx, [offsety] = @offsety, [patternscalex] = @patternscalex, [patternscaley] = @patternscaley, [mergeOpenValue] = @mergeOpenValue, [mergeOpenUnit] = @mergeOpenUnit, [comment] = @comment, [pivotx] = @pivotx, [pivoty] = @pivoty, [rotate] = @rotate, [fs_us_pk] = @fs_us_pk, [xformxml] = @xformxml, [papersize] = @papersize, [frompage] = @frompage, [topage] = @topage WHERE [id] = @id AND (([timestamp] = @timestamp) OR (@timestamp IS NULL)); SELECT [timestamp] FROM [dbo].[PSOFormstore] WHERE [id] = @id;

Command Parameters

@mandator_id:    '0' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: mandator_id | SourceVersion: Current]

@filename:    'Hartl_Besprechungsformular_Seite1.xform' [DbType: AnsiString | Size: 66 | Direction: Input | SourceColumn: filename | SourceVersion: Current]

@formsetid:    'Hartl_Besprechungsformular' [DbType: AnsiString | Size: 66 | Direction: Input | SourceColumn: formsetid | SourceVersion: Current]

@active:    '255' [DbType: Byte | Size: 1 | Direction: Input | SourceColumn: active | SourceVersion: Current]

@validForm:    '01.06.2009 00:00:00' [DbType: DateTime | Size: 0 | Direction: Input | SourceColumn: validForm | SourceVersion: Current]

@validto:    '11.06.2009 00:00:00' [DbType: DateTime | Size: 0 | Direction: Input | SourceColumn: validto | SourceVersion: Current]

@offsetx:    '0' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: offsetx | SourceVersion: Current]

@offsety:    '0' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: offsety | SourceVersion: Current]

@patternscalex:    '1' [DbType: Double | Size: 0 | Direction: Input | SourceColumn: patternscalex | SourceVersion: Current]

@patternscaley:    '1' [DbType: Double | Size: 0 | Direction: Input | SourceColumn: patternscaley | SourceVersion: Current]

@mergeOpenValue:    '0' [DbType: Int16 | Size: 0 | Direction: Input | SourceColumn: mergeOpenValue | SourceVersion: Current]

@mergeOpenUnit:    '' [DbType: AnsiString | Size: 11 | Direction: Input | SourceColumn: mergeOpenUnit | SourceVersion: Current]

@comment:    '' [DbType: AnsiString | Size: 257 | Direction: Input | SourceColumn: comment | SourceVersion: Current]

@pivotx:    '0' [DbType: Double | Size: 0 | Direction: Input | SourceColumn: pivotx | SourceVersion: Current]

@pivoty:    '0' [DbType: Double | Size: 0 | Direction: Input | SourceColumn: pivoty | SourceVersion: Current]

@rotate:    '0' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: rotate | SourceVersion: Current]

@fs_us_pk:    '11' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: fs_us_pk | SourceVersion: Current]

@xformxml:    '' [DbType: AnsiString | Size: -1 | Direction: Input | SourceColumn: xformxml | SourceVersion: Current]

@papersize:    'A5' [DbType: AnsiString | Size: 13 | Direction: Input | SourceColumn: papersize | SourceVersion: Current]

@frompage:    '1' [DbType: Byte | Size: 1 | Direction: Input | SourceColumn: frompage | SourceVersion: Current]

@topage:    '1' [DbType: Byte | Size: 1 | Direction: Input | SourceColumn: topage | SourceVersion: Current]

@id:    '2' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: id | SourceVersion: Original]

@timestamp:    'System.Byte[]' [DbType: Binary | Size: 8 | Direction: Input | SourceColumn: timestamp | SourceVersion: Current]
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
What is this function doing: mmks_updatePSOForm(loPSOFormStoreBO)




Edhy Rijo

dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Also.. one comment.. If I remove transaction.. code does not call any error. and data saves.. Unsure
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Its just to set values for BO properties



Private Sub mmks_updatePSOForm(ByVal toBO As PSOFormStoreBO)



Dim lcXformXML As String = ""

If Me.FileUploadXForm.HasFile() = True Then

Dim loStreadReader As StreamReader = New StreamReader(Me.FileUploadXForm.PostedFile.InputStream)

lcXformXML = loStreadReader.ReadToEnd()

End If



toBO.filename = Me.PSOForm_filename.Text

toBO.formsetid = Me.PSOForm_formsetid.Text

toBO.validForm = Me.PSOForm_validFrom.Value

toBO.validto = Me.PSOForm_validTo.Value

toBO.papersize = Me.PSOForm_Papersize.Value

toBO.topage = Me.PSOForm_topage.Value

toBO.frompage = Me.PSOForm_fromPage.Value

toBO.comment = Me.PSOForm_HtmlEditor1.Text



If Not String.IsNullOrEmpty(lcXformXML) Then

toBO.xformxml = lcXformXML

End If





End Sub
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search