|
-
Jul 25th, 2022, 04:09 PM
#3
Thread Starter
Fanatic Member
Re: Operation Must Use an updateable Query
Thanks a lot JDC. Information has been scant. Anyway, I am pretty sure (whatever that really means) that the error occurs in the update part of the query below. There are several of these tables used and each time I try to add a record this error occurs. I believe it is in the UPDATE of the ascension number tables I use. Here is the one that I have been running in the installed application:
Code:
'Parameters
MasterBase.MasterBaseQuery("SELECT colStaffID FROM setStaffID")
Dim r As DataRow = MasterBase.ListTable.Rows(CurrentRecord)
If r("colStaffID").ToString = "" Then
RecordID = "EM100000"
Else
Dim Recno As String = r("colStaffID").ToString
Dim intFileID As Integer = CInt(Mid(Recno, 3, 6))
intFileID += 1
RecordID = "EM" + CStr(intFileID)
End If
'Update ID with incremented value
MasterBase.AddParam("@staffid", RecordID)
MasterBase.MasterBaseQuery("UPDATE setStaffID SET colStaffID=@staffid " +
"WHERE colStaffID=@staffID")
Return RecordID
End Function
I use several tables to create ascension numbers that meet two requirements. The first is that the number has a specific number of digits. The second is that the number have a two character designator. The field is a character field. Each of these tables consist of a single field and a single record. None of the tables had the field designated as a Primary field and I corrected that. Additionally, I added a WHERE clause to the query, since one did not previously exist.
I was hopeful that redeploying and reinstalling the application after this might resolve the problem, Alas that was not the case. I am still going through your suggestions and hoping I can make something work. However, assuming that I did not miss any required outputs/files/Assemblies, I really am having a hard time understanding why everything works in debug, but not as an installed application.
I am still going through your suggestions and hope I am getting close to resolution.
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
|