CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 File Upload Component and Delete?

Print topic Send  topic

Author Message
Robert Rodgers
Posted: 06/03/2003, 2:51 PM

Hi All,
ASP CCS 2.06.11

Does the File Upload component (class) automatically delete the image when
deleting the record? It looks like it was supposed to but for some reason
the code generated is incorrect.

'PlayerImages DeleteRow Method @9-A3BA92B7
Function DeleteRow()
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeDelete", Me)
If NOT DeleteAllowed Then DeleteRow = False : Exit Function
PlayerImage.Upload Empty
DataSource.Delete(Command)


'+++++++++++++++++++++++++++++++
'Here if the error.count is 0 it should delete the file not
MoveFromTempFolder.
'If I change it to call the DeleteFile method when the Error.count is 0 then
it works.
If DataSource.Errors.Count = 0 Then
PlayerImage.MoveFromTempFolder
Else
PlayerImage.DeleteFile
End If
'++++++++++++++++++++++++++++++++++

CCSEventResult = CCRaiseEvent(CCSEvents, "AfterDelete", Me)
If DataSource.Errors.Count > 0 Then
PrintDBError "Record " & ComponentName & " / Delete Operation",
DataSource.Connection.LastSQL, DataSource.Errors.ToString()
DataSource.Errors.Clear
Errors.AddError "Database command error."
End If
DeleteRow = (Errors.Count = 0)
End Function
'End PlayerImages DeleteRow Method

--
"Every absurdity has a champion to defend it"
Oliver Goldsmith
++++++++++++++++++++++++++++++


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.