CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 dynamic WHERE for queries with JOINs doesn't work

Print topic Send  topic

Author Message
GeorgeS

Posts: 206
Posted: 09/27/2004, 10:01 AM

Hi,
I have a grid with Right JOIN query which was created through CCS. I also attached 2 WHERE params.
Now, if I'm trying to change WHERE clause in BeforeBuildSelect event it doesn't do anything.
Dynamically changin SQL in the same event gives an error and shows an old WHERE clause after my new SQL string with new WHERE clause.

It looks like I can't use DataSource.Where and DataSource.SQL for modifying queries with JOINs.
Is this correct or I'm doing something wrong?
Thanks
_________________
GeorgeS
View profile  Send private message
Benjamin Krajmalnik
Posted: 10/15/2004, 3:40 PM

Works fine for me.
Using the following:


if MyFlag = True then 'this is a condition based on a configuration field
MyTable.Datasource.Where = "MyTable.Approved = 1"
End if


GeorgeS

Posts: 206
Posted: 10/15/2004, 4:03 PM

Benjamin,
what kind of query do you have?
Is it based on several tables?


_________________
GeorgeS
View profile  Send private message
peterr


Posts: 5971
Posted: 10/16/2004, 5:30 AM

George,

JOINs shouldn't matter. The SQL is handled the same way with or without joins. I recommend that you:
a) delete your whole Page.asp file (but not Page_events.asp), so that it is rebuilt in case was corrupted.
b) Keep in mind that WHERE may not exist and therefore not be used when parameters are empty. Although I'm not sure if this may be relevant in this case.
c) Post your code, in case you are doing something wrong.

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Benjamin Krajmalnik
Posted: 10/26/2004, 9:45 AM

I have complex queries which access multiple tables in the where clause
withut any problems.

"GeorgeS" <GeorgeS@forum.codecharge> wrote in message
news:641705739e12c1@news.codecharge.com...
> Benjamin,
> what kind of query do you have?
> Is it based on several tables?
>
>
> _________________
> GeorgeS
> ---------------------------------------
> 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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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