Object or Provider is not able to perform the requested operation
Asked Answered
M

0

11

I am trying to run the classic asp application which uses RDS (Remote data service) on Windows Server 2008

<object id="RDS_ACCOUNTS" CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
 height=1 width=1 VIEWASTEXT>

Following is the code written in window_load() event

RDS_ACCOUNTS.ExecuteOptions = 1
RDS_ACCOUNTS.FetchOptions = 1
RDS_ACCOUNTS.Server = "<%=strServer%>"
RDS_ACCOUNTS.Connect =Connect
RDS_ACCOUNTS.SQL = "SELECT ACCOUNT_TYPE_ID, CLIENT_ID, ACCOUNT_TYPE_DESC 
   FROM TBL_AP_CHART_ACCOUNT_TYPE 
   WHERE CLIENT_ID=<% = Session("ClientID")%> 
   ORDER BY ACCOUNT_TYPE_DESC "
RDS_ACCOUNTS.Refresh
Dim AccountRst
Set AccountRst = RDS_ACCOUNTS.Recordset

Here connect variable have its value from RDSConn.inc file which have the value

Handler=MSDFMAP.Handler;Data Source=AMTAPP;

This handler picks value from msdfmap.ini file located in C:\Windows folder which contains the OLEDB Connection Stringor DSN Name. But when i run this code it gives me exception

Object or Provider is not able to perform the requested operation on RDS_ACCOUNTS.Refresh method.

Microelectronics answered 1/4, 2015 at 10:4 Comment(15)
Visit this link, it may help: webwiz.co.uk/kb/asp-tutorials/access-database-errors.htmLysol
Don't Get the Answer..@BhupendraShuklaMicroelectronics
Could be a permissions issue? Does the user that the website runs under have RDS permissions?Whimwham
Yes the user have the permission to run the RDSMicroelectronics
Why this question has tag 'vba'?Brassica
Does it work properly if you set the RDS_ACCOUNTS.Connect directly equal to the OLEDB string, rather than using MSDFMAP.Handler?Osteoplastic
No it does not work properly @OsteoplasticMicroelectronics
where do strServer and Session("ClientID") come from?Venn
it comes from the application and this page is the part of that application. you can use "url" in the place of "<%=strServer%> and on the place of whole sql query you can write any simple select query.Microelectronics
but should it be RDS_ACCOUNTS.Server = strServer not RDS_ACCOUNTS.Server = "<%=strServer%>"?Venn
Does a more trivial request work ? (i.e. playing with constant values)Phelan
But it works on different server...@oraclecertifiedprofessionalMicroelectronics
@oraclecertifiedprofessional No the OP is passing the <%= strServer %> as a server-side variable to the RDS_ACCOUNTS.Server which is running in client side VBScript.Large
Is this VBS file or Classic ASP?Walliw
Almost feels like this is what the code should look like RDS_ACCOUNTS.ExecuteOptions = 1 RDS_ACCOUNTS.FetchOptions = 1 RDS_ACCOUNTS.Server = strServer RDS_ACCOUNTS.Connect =Connect RDS_ACCOUNTS.SQL = "SELECT ACCOUNT_TYPE_ID, CLIENT_ID, ACCOUNT_TYPE_DESC FROM TBL_AP_CHART_ACCOUNT_TYPE WHERE CLIENT_ID=" & Session("ClientID") & " ORDER BY ACCOUNT_TYPE_DESC " RDS_ACCOUNTS.Refresh Dim AccountRst Set AccountRst = RDS_ACCOUNTS.RecordsetWalliw

© 2022 - 2024 — McMap. All rights reserved.