This is a problem that has plagued me on several applications. Something I am doing in a script is causing a Violated error. This locks the table and renders the application useless. I can only clear it when I reboot the server. I have run a debug and the problem seems to be occuring at the m_table.Update() command.
The tableitself is simple, only character fields being updated. Only field rule is a auto increment of the MaskItem field.
I'll freely admit I am learning this stuff as I go but so far I can't find the problem,
Here is the code
function update_mask_info as c (e as p)
dim mask as c = e.rv.v.r1.MaskItem
dim maskid as c = e.rv.v.r1.Maskid
dim with as c = e.rv.v.r1.Used_With
dim cust as c = e.rv.v.r1.Customer
dim il as c = e.rv.v.r1.Inventory_Location
dim fsz as c = e.rv.v.r1.Feature_Size
dim fsp as c = e.rv.v.r1.Feature_Spacing
dim type as c = e.rv.v.r1.Mask_Type
dim ebr as c = e.rv.v.r1.Ebr
dim exp as c = e.rv.v.r1.Exposure
dim vac as c = e.rv.v.r1.Vacuum
dim rt as c = e.rv.v.r1.Resist_Thickness
dim m_table as p
m_table = table.open("c:\noel_db\mask.dbf",file_rw_shared)
query.filter = "MaskItem ="+quote(mask)
query.order = ""
query.options = "I"
query.description = "Temporary Query"
i_indx = m_table.query_create("N")
update.fields = 11
update.field1 = "MaskId"
update.expr1 = quote(maskid)
update.field2 = "Used_With"
update.expr2 = quote(with)
update.field3 = "Customer"
update.expr3 = quote(cust)
update.field4 = "Inventory_Location"
update.expr4 = quote(il)
update.field5 = "Feature_Size"
update.expr5 = quote(fsz)
update.field6 = "Feature_Spacing"
update.expr6 = quote(fsp)
update.field7 = "Mask_Type"
update.expr7 = quote(type)
update.field8 = "EBR"
update.expr8 = quote(ebr)
update.field9 = "Exposure"
update.expr9 = quote(exp)
update.field10 = "Vacuum"
update.expr10 = quote(vac)
update.field11 = "Resist_Thickness"
update.expr11 = quote(rt)
m_table.update()
m_table.close()
end function
This is driving me nuts.. Anybody spot the problem?
Steve
The tableitself is simple, only character fields being updated. Only field rule is a auto increment of the MaskItem field.
I'll freely admit I am learning this stuff as I go but so far I can't find the problem,
Here is the code
function update_mask_info as c (e as p)
dim mask as c = e.rv.v.r1.MaskItem
dim maskid as c = e.rv.v.r1.Maskid
dim with as c = e.rv.v.r1.Used_With
dim cust as c = e.rv.v.r1.Customer
dim il as c = e.rv.v.r1.Inventory_Location
dim fsz as c = e.rv.v.r1.Feature_Size
dim fsp as c = e.rv.v.r1.Feature_Spacing
dim type as c = e.rv.v.r1.Mask_Type
dim ebr as c = e.rv.v.r1.Ebr
dim exp as c = e.rv.v.r1.Exposure
dim vac as c = e.rv.v.r1.Vacuum
dim rt as c = e.rv.v.r1.Resist_Thickness
dim m_table as p
m_table = table.open("c:\noel_db\mask.dbf",file_rw_shared)
query.filter = "MaskItem ="+quote(mask)
query.order = ""
query.options = "I"
query.description = "Temporary Query"
i_indx = m_table.query_create("N")
update.fields = 11
update.field1 = "MaskId"
update.expr1 = quote(maskid)
update.field2 = "Used_With"
update.expr2 = quote(with)
update.field3 = "Customer"
update.expr3 = quote(cust)
update.field4 = "Inventory_Location"
update.expr4 = quote(il)
update.field5 = "Feature_Size"
update.expr5 = quote(fsz)
update.field6 = "Feature_Spacing"
update.expr6 = quote(fsp)
update.field7 = "Mask_Type"
update.expr7 = quote(type)
update.field8 = "EBR"
update.expr8 = quote(ebr)
update.field9 = "Exposure"
update.expr9 = quote(exp)
update.field10 = "Vacuum"
update.expr10 = quote(vac)
update.field11 = "Resist_Thickness"
update.expr11 = quote(rt)
m_table.update()
m_table.close()
end function
This is driving me nuts.. Anybody spot the problem?
Steve
Comment