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

 Single Quotes integrity

Print topic Send  topic

Author Message
Edd


Posts: 547
Posted: 04/10/2006, 3:39 PM

Simple problem (no soultion):

I am saving SQL statements inside my database as the contents of a field (It is used for a separate app) but they continually get screwed up by CCS as it always overllays the CCtoSQL statement.

Example:
[ Select Code from MyTable where Code > '' ]

CCS saves this to the dayabase as
[ Select Code from MyTable where Code > ' ]

I have tried replacing the field contents in the BeforeUpdate event but it doesn't work.

Yet !!! when I save this in the forum it works?


_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
WKempees
Posted: 04/10/2006, 4:08 PM

In Common.php
Find CCToSQL
introduce a new type like ccsInteger and ccsFloat
name it ccsIgnore
In the If Then Else introduce
Elseif($ValueType == ccsIgnore){
return "'" . $Value . "'";
}

O well you figure out the rest.








"Edd" <Edd@forum.codecharge> schreef in bericht
news:6443ade8a22809@news.codecharge.com...
> Simple problem (no soultion):
>
> I am saving SQL statements inside my database as the contents of a field
> (It is
> used for a separate app) but they continually get screwed up by CCS as it
> always
> overllays the CCtoSQL statement.
>
> Example:
> [ Select Code from MyTable where Code > '' ]
>
> CCS saves this to the dayabase as
> [ Select Code from MyTable where Code > ' ]
>
> I have tried replacing the field contents in the BeforeUpdate event but it
> doesn't work.
>
> Yet !!! when I save this in the forum it works?
>
>
> _________________
> There are only 10 people in this world, those who understand Binary and
> those
> that don't.
>
> http://www.syntech.com.au
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
>

wkempees


Posts: 1679
Posted: 04/10/2006, 4:14 PM

Needs a

define("ccsIgnore",7);

too in or about line 64

Not sure if it works though.
I was actually a bit sorry I posted this Edd.
L8R


_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
wkempees


Posts: 1679
Posted: 04/10/2006, 4:14 PM

type ccsMemo, type ccsText could help too

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
Edd


Posts: 547
Posted: 04/10/2006, 4:29 PM

Thanks Walter but I avoid touching base classess, been really burn't really badly in the past on more than one occasion.

I think I have a workaround that seems to function. A lot more work but this only affects 2 screens I will live with it.

What I did is changed my inserts and updates to "SQL" then I constructed the SQL from the controls ignoring the SQL from the filter.

I really does beg the question "How does this forum work" if it is running CCS they must have done something similar.

I really like your idea about the ignore data type it would help me in a 3rd party database where the idiots don't allow Nulls in data fields, therefore when CCS inserts a blank field it changes it to Nulls (as it should do in 99% of cases) and the insert and update fail.

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
peterr


Posts: 5971
Posted: 04/10/2006, 5:02 PM

Edd,
I would report this to support. It looks strange that anything would be saved into database differently than entered. I don't recall such issue.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Edd


Posts: 547
Posted: 04/10/2006, 6:08 PM

Peter R and Walter thanks..

Lets flag this as one more embarrasing moment :-/ in a LONG list of embarrasing moments of too much coffee not thinking straight.

The issue was that the field type was marked as Text in the designer (easily missed) and once I marked it as Memo we no longer had a problem.

Walter was on the right track, however I still don't suggest touching the Common files.

For those who read this later don't attempt the SQL insert/updates as they user the base classes to prepare the SQL so you don't gain anything.

Again many thanks guys.

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
WKempees
Posted: 04/11/2006, 2:51 AM

Edd

The right track indeed.
If you change the field type to Memo, guess what CCS does?
CCtoSQL(" ",ccsMemo)

Great stuff this CCS.
Walter



"Edd" <Edd@forum.codecharge> schreef in bericht
news:6443b018066e02@news.codecharge.com...
> Peter R and Walter thanks..
>
> Lets flag this as one more embarrasing moment :-/ in a LONG list of
> embarrasing moments of too much coffee not thinking straight.
>
> The issue was that the field type was marked as Text in the
> designer
> (easily missed) and once I marked it as Memo we no longer had a
> problem.
>
>
> Walter was on the right track, however I still don't suggest touching the
> Common files.
>
> For those who read this later don't attempt the SQL insert/updates as they
> user
> the base classes to prepare the SQL so you don't gain anything.
>
> Again many thanks guys.
>
> _________________
> There are only 10 people in this world, those who understand Binary and
> those
> that don't.
>
> http://www.syntech.com.au
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.

MS Access to Web

Convert MS Access to Web.
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.