CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Last Attempt to make u fix one bug in codecharge 3.0

Print topic Send  topic

Author Message
Intexk
Posted: 11/21/2005, 1:49 AM

This bug only happens in ASP, i watched the code php,.net,etc and it works there...but only fails in asp.

When i choose Custom Delete in a record and i add a parameter this is the code that autogenerate

Sub Delete(Cmd)
CmdExecution = True
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildDelete", Me)
Set Cmd.Connection = Connection
Cmd.CommandOperation = cmdExec
Cmd.CommandType = dsSQL
Cmd.SQL = "DELETE FROM articles WHERE article_id = {article_id}"
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteDelete", Me)
If Errors.Count = 0 And CmdExecution Then
Cmd.Exec(Errors)
CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteDelete", Me)
End If
End Sub


Now if i do a custom update with the same sentence i get this.

Sub Update(Cmd)
CmdExecution = True
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildUpdate", Me)
Set Cmd.Connection = Connection
Cmd.CommandOperation = cmdExec
Cmd.CommandType = dsSQL
Cmd.SQL = "DELETE FROM articles WHERE article_id = {article_id}"
With Cmd.Parameters
Set .Connection = Connection
Set .DataSource = Me
.AddParameter "article_id", "dsarticle_id", ccsInteger, Empty, Empty, 0, False
End With
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteUpdate", Me)
If Errors.Count = 0 And CmdExecution Then
Cmd.Exec(Errors)
CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteUpdate", Me)
End If
End Sub


As u can see...the update cmd will work...but the delete cmd will not work cause it miss a part of code...the part of the code that will retrive the parameter that needs:


With Cmd.Parameters
Set .Connection = Connection
Set .DataSource = Me
.AddParameter "article_id", "dsarticle_id", ccsInteger, Empty, Empty, 0, False
End With

I hope someone can fix that bug, it's very old..i dunno when since was it's there, but only happens in asp code.


Thx
mrachow


Posts: 509
Posted: 11/22/2005, 12:23 AM

Hi Intexk,

you should contact support with this kind of issues.

This is a user forum where users of Studio try to help each other.
For technical problems sometimes we know a workaround but we are not at the position to fix something on Studio.

_________________
Best regards,
Michael
View profile  Send private message
guest
Posted: 11/22/2005, 6:03 AM

This looks as your custom delete havn't parameters...
Please check it.
Intexk
Posted: 11/23/2005, 1:21 AM

i did...as i said...both custom delete and custom update has the same parameter set up and from the same source ({article_id} from url).

I checked also the xml of that page (*.ccp files) and the property is setup correctly...so the only problem here is they forgot to add something in the autogenerator code only for the custom delete with parameters.
guest
Posted: 11/23/2005, 4:53 AM

Is your ccp contains a line like:
<DSQLParameters>
<SQLParameter id="10" variable="article_id" parameterType="URL" .......
</DSQLParameters>
Intexk
Posted: 11/23/2005, 7:20 AM

This is the extract part of the cpp file...
for custom delete
<DSQLParameters>
<SQLParameter id="27" variable="article_id" parameterType="DataSourceColumn" dataType="Integer" parameterSource="article_id" defaultValue="0"/>
</DSQLParameters>

and this is part of the custom update
<USQLParameters>
<SQLParameter id="26" variable="article_id" parameterType="DataSourceColumn" dataType="Integer" parameterSource="article_id" defaultValue="0"/>
</USQLParameters>
Intexk
Posted: 11/23/2005, 7:24 AM

sorry...i were testing to change source of variable (url,expression,etc)..so the above is datasourcecolumn

this one is the url one and it fails too.
for custom update;

<USQLParameters>
<SQLParameter id="26" variable="article_id" parameterType="URL" dataType="Integer" parameterSource="article_id" defaultValue="0"/>
</USQLParameters>

for custom delete;
<DSQLParameters>
<SQLParameter id="27" variable="article_id" parameterType="URL" dataType="Integer" parameterSource="article_id" defaultValue="0"/>
</DSQLParameters>
Intexk
Posted: 11/23/2005, 7:35 AM

Last update of this bug;

First...it only happens an editablegrid, not in a normal record.

Add new topic Subscribe to topic   


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

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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