By adding import arcpy
to the beginning of your code, and replacing your *.dbf with a test DBF file, I tested your code and was not able to reproduce your error message:
import arcpy
tab_cg_r="C:\Temp\Test.dbf"
arcpy.env.workspace = "C:\Temp"
arcpy.ClearWorkspaceCache_management()
if arcpy.Exists("C_R_otim_view"):
arcpy.Delete_management("C:\Temp\Test.dbf")
arcpy.env.workspace = "C:\Temp"
arcpy.ClearWorkspaceCache_management()
arcpy.CreateTable_management('C:\Temp', "Test.dbf")
# Process: Add Field
arcpy.AddField_management(tab_cg_r, "Barr", "Text", "", "", "50", "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Pt_M", "Float", "", "", 10, "", "NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Longitude", "Float", "", "", 10, "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.AddField_management(tab_cg_r, "Latitude", "Float", "", "", 10, "", "NON_NULLABLE", "NON_REQUIRED", "")
arcpy.DeleteField_management(tab_cg_r, 'Field1')
##
rows_t_cR = arcpy.InsertCursor("C:\Temp\Test.dbf")
for x in range(0, (len(N_name_LR))):
row = rows_t_cR.newRow()
rows_t_cR.insertRow(row)
arcpy.MakeTableView_management("C:\Temp\Test.dbf", "C_R_otim_view")
Instead I got:
Traceback (most recent call last):
File "C:\Temp\test.py", line 23, in <module>
for x in range(0, (len(N_name_LR))):
NameError: name 'N_name_LR' is not defined
I could keep fixing things as I find them by guessing what you may be doing but I think the onus should be on you to provide us with code snippets that work up to where you are stuck.
In any event, I think the problem may be that you are running your code when you have another application - perhaps ArcMap, perhaps a Python IDE, or perhaps something else holding a lock on your F:\\ArcGIS\Trab\Model\Result_otim\C_R_otim.dbf
file. This is indicated in the error message that you received which included:
May be locked by another application
I recommend closing all applications, even rebooting if this particular error persists, and then running just your test. That way there should be only the one application running.
I do not think that you are seeing ERROR 000601 for the same reason as Using os.remove in ArcGIS Python script tool? because that question is using ArcSDE when there is no suggestion in your question that you may be too. ClearWorkspaceCache is only used with enterprise geodatabases (ArcSDE) and so is not necessary in your code.
Best Answer
I've been having the same problem when I trying to create a model with Iterate and and the only way I found to fix it was unchecking 'Intermediate" processes. It worked very well.