Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerprompts

Status
Not open for further replies.

steph09

Programmer
Aug 6, 2004
1
FR
Hi,

I've got a problem, I am not able to do a request when the filter criteria to the sql query is a variable issue from a previous request.

For exemple, this query is OK :
rs.Open("Select distinct BASSIN from COM_ORGANISATION where BASSIN IS NOT NULL" , "DWH");

But this, KO :
rs.Open("Select distinct BASSIN from .COM_ORGANISATION where BASSIN IS NOT NULL AND REGION = " + (App.Variables("Region_bassin")) , "DWH");

the error is :
Method call [Recordset.Open] failed
Error near no filename:74 [Open()].
from no filename:74 [:Global Initialization:()]
Error: Failed executing the SQL request.
UDA Error: [SQL Server: DWH] Incorrect syntax near 'DE'.
UDA Error: DMS-E-SECURITY, An operation was attempted without appropriate permissions during operation 'prepare request'.
UDA Error: DMS-E-GENERAL, A general exception has occurred during operation 'prepare request'.


For information, when I take only on my HTML page : Response.Write(App.Variables("Region_bassin")), it's all right


Where is the problem?
Can somebody please help me out with this ?

Thanks

Steph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top