General error 0 description 109 when checking in a file

General error 0 description 109 when checking in a file

kenhoff
Enthusiast Enthusiast
566 Views
2 Replies
Message 1 of 3

General error 0 description 109 when checking in a file

kenhoff
Enthusiast
Enthusiast

I have written code to rename files to match on of its Iproperties. This all works fine, most of the time. Since we have switched to Vault 2023 from 2020 I am getting some complaints from the users. The need to run the code a few times for it to work. The error is 0 with a description of 109.

 

Looking in the vlogs it seems to say this: Conversion failed when converting the nvarchar value 'User Name' to data type int.  I substituted User Name for the actual name of the user.

 

3 questions,

1. Why does it work sometimes?

2. Why is it trying to convert the user name to an int (I assume this is integer)?

3. How do I make the error stop?

 

I include the entire error below.

 

8/29/2022 5:14:29 PM *******************************************************************
Error: Soap Exception ( mesg-id = 637973900697596154 )
Exception: DatabaseError [109]
Stacktrace:
Server stack trace:

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Connectivity.Document.Services.FileService.CheckinUploadedFile(Int64 fileMasterId, String comment, Boolean keepCheckedOut, DateTime lastWrite, FileAssociationParam[] associations, BOM bom, Boolean copyBom, String newFilename, FileClassification fileClassification, Boolean hidden, UploadTicket uploadTicket)
at Connectivity.Web.Services.v28.DocumentService.CheckinUploadedFile(Int64 fileMasterId, String comment, Boolean keepCheckedOut, DateTime lastWrite, FileAssociationParam[] associations, BOM bom, Boolean copyBom, String newFileName, FileClassification fileClassification, Boolean hidden, ByteArray uploadTicket)
at SyncInvokeCheckinUploadedFile(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Exception(Inner): Conversion failed when converting the nvarchar value 'User Name' to data type int.
Stacktrace(Inner): at Connectivity.Core.Database.TransactionContext.OnSqlException(SqlException e)
at Connectivity.Core.Database.SqlAccess.ExecuteReaderInternal(SqlCommand cmd)
at Connectivity.Core.Database.SqlAccess.ExecuteReader(CommandType commandType, String commandText, SqlParameter[] commandParameters, Int32 commandTimeout)
at Connectivity.Core.DataAccess.Director.InvokeCommand()
at Connectivity.Document.DataAccess.Files.CheckinFile(Int64 fileMasterId, Nullable`1 checkinDate, DateTime modDate, String comment, Int32 checksum, Int64 fileSize, Boolean dependenciesChanged, FileAssociationParam[] associations, Boolean allowUncommittedDependencies, BOM bom, String fileName, FileClassification fileClassification, Boolean hidden, Boolean performSecurityCheck, Int64 contentSourceId, Nullable`1 resourceGuid, String& generartedBomData)
at Connectivity.Document.BusinessLogic.FileBL._CheckinFile(Int64 fileMasterId, String comment, Nullable`1 checkinDate, DateTime lastWrite, Int32 checksum, Int64 fileSize, Boolean dependenciesChanged, FileAssociationParam[] associations, Boolean allowUncommittedDependencies, BOM bom, String fileName, FileClassification fileClassification, Boolean hidden, File fileToCopyResourceFrom, Boolean skipIndexing, Boolean performSecurityCheck, Int64 contentSourceId, UploadTicket uploadTicket)
at Connectivity.Document.BusinessLogic.FileBL.CheckinUploadedFile(Int64 fileMasterId, String comment, Boolean keepCheckedOut, Int64 checkinUser, Nullable`1 checkinDate, Nullable`1 lastWrite, FileAssociationParam[] associations, Boolean allowUncommittedDependencies, BOM bom, Boolean copyBom, String newFilename, FileClassification fileClassification, Boolean hidden, CheckinOptions options, UploadTicket uploadTicket)
at Connectivity.Document.Services.FileService.CheckinUploadedFile(Int64 fileMasterId, String comment, Boolean keepCheckedOut, DateTime lastWrite, FileAssociationParam[] associations, BOM bom, Boolean copyBom, String newFilename, FileClassification fileClassification, Boolean hidden, UploadTicket uploadTicket)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

0 Likes
567 Views
2 Replies
Replies (2)
Message 2 of 3

ChristianAhlers
Contributor
Contributor

Maybe you can be better helped if you share the code that causes this error. Otherwise it's a guessing game, because the error message doesn't tell you much about what's "wrong" in your code.

 

Kind regards 

Chris

0 Likes
Message 3 of 3

kenhoff
Enthusiast
Enthusiast

I think the question is more : Why does the Autodesk code try to convert a string into an integer?

 

But if I had all of the answers then I would not be asking the question. Her is the bit that gives heartburn (it is iLogic):

 

checkingprogress = Clogin.FileManager.AcquireFiles(SFCO)

For Each UFN In checkingprogress.FileResults
If UFN.File.CheckedOutSpec IsNot Nothing Then

cip1 = UFN.NewFileIteration

cip2 = "filename.ipt"

cip3 = UFN.NewFileIteration.FileClassification

Dim FileAssoc As New Autodesk.Connectivity.WebServices.FileAssocParam()

Dim FAP As ArrayList = New ArrayList

Dim NFA = TryCast(FAP.ToArray(GetType(Autodesk.Connectivity.WebServices.FileAssocParam)), Autodesk.Connectivity.WebServices.FileAssocparam())

Clogin.FileManager.CheckinFile(cip1, "Was " & cip1.EntityName, False, NFA, Nothing, True, cip2, cip3, False, Nothing)

endif
next

 

 

file name is the thing I'm updating with the code and I removed the bit that generates it because I don't think it relevant. Also I didn't include the bit where I check out the part(s) so I can rename it(them). SFCO is the file(s) I am getting.

 

Any help/thought are of course appreciated.

0 Likes