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 |
 |
 |
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 |
 |
 |
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 |
 |
 |
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/
>
|
|
|
 |