|
-
Jun 12th, 2022, 10:41 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Post deployment error
I know the title sounds like something that should be discussed in a ED forum, but strangely enough it isn't.
I have an application that works as expected until after it is deployed and I am running the program. When I attempt to add a new record I receive the following error.
Operation muse use an updateable query.
I am pretty sure that the method below is the routine and the line (bold, italic) that the failure occurs, since the single row of the table used in the update is not updated.
Code:
Public Function GetFileMasterID(ByVal FileID As String) As Object 'FileMasterID
Dim recordID As String
'Parameters
FileMaster.FileMasterQuery("SELECT colFileMasterID FROM setFileMasterID")
Dim r As DataRow = FileMaster.ListTable.Rows(CurrentRecord)
If r("colFileMasterID").ToString = "" Then
recordID = "FM10000001"
Else
Dim recno As String = r("colFileMasterID").ToString
Dim intFileID As Integer = CInt(Mid(recno, 3, 8))
intFileID += 1
recordID = "FM" + intFileID.ToString
End If
'Update FileMaster ID in table
FileMaster.AddParam("@recno", recordID)
FileMaster.FileMasterQuery("UPDATE setFileMasterID SET colFileMasterID=@recno")
Return recordID
End Function
Now since this routine works without error while running the program in project mode it is my belief that the error is caused by my failing to get all the required files inserted into the build as I run the Setup Wizard. Of course that is merely a process N=1 guess.
So is there a reasonable possibility that my guess is right? And, if so, what might I have missed adding in my deployment package? On the other hand, the code I am using to create and keep track of an ascension number is probably kind of wonky, but it has served me well for quite some time and I have never looked for what is probably a better way of doing that. Additionally, I have deployed in the past, using this same method, without issue.
The ascension number comes from a table with a single column and a single record setFileMasterID. As you can see, the number (string) is pulled out of the table, run through the ascension routine and then returned to the table. This number is then bound to a control and later placed in the ID column of sitFileMaster.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|