girish_327
Posts: 108
|
| Posted: 07/23/2004, 9:29 AM |
|
If user1.DataSource.Errors.Count = 0 Then
CCExecSQL "DELETE FROM [ebook] WHERE ebook_submited_by = " & CCToSQL(user1.DataSource.Parameters("user_id"),"Integer"),DBebook,true
End If
I have table ebook and another is user. when i delete the any user then i want delete the related ebook records from ebook table i have used above code but it cant work. Any one help me out in this problem i have taken this code from CCS Help.
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 07/23/2004, 2:31 PM |
|
Please explain the terms "not working" and "cant work"
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
girish_327
Posts: 108
|
| Posted: 07/23/2004, 9:57 PM |
|
Currently i have used above code in after delete event but its not deleting the related records also its not giving any error.
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 07/23/2004, 11:08 PM |
|
OK. Since you do not see any errors then probably one of the two things happens:
1. The code is not executed at all, for example if you placed it in a wrong event. You can type "aaa" within your If statement, just to see if it gets executed and an error occurs.
or
2. No matching records are found. In this case You may need to debug your statement and print the value that you are you using, for example:
response.write CCToSQL(user1.DataSource.Parameters("user_id"),"Integer")
response.end
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
girish_327
Posts: 108
|
| Posted: 07/25/2004, 5:15 AM |
|
Solved ... Its Actually Programming Error. The above code is wrongSolved
If user1.DataSource.Errors.Count = 0 Then
CCExecSQL "DELETE FROM [ebook] WHERE ebook_submited_by = " & CCToSQL(user1.DataSource.Parameters("urluser_id"),"Integer"),DBebook,true
End If
My database field name is user_id but in the parameters we have to use urluser_id I dont why ....?
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
|