I created a model with model builder using the tool Generate near talbe. for output i use %scratchworkspace%\Nearstrat.dbf. When i run the model once everyting is fine. But then i get the error that the file already exists. is there a way to overwrite the file?
ArcGIS Geoprocessing services will overwrite existing data by default. If you are on 10.1, I would suggest that you use %scratchfolder% instead of %scratchworkspace% since you're writing a .dbf. But if you're creating geoprocessing services with 10.1, you don't have to use any scratch workspace or folder -- the service publishing process figures out that you're writing a .dbf file and will 'automagically' write it to the scratch folder.