cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC Call Failed: Permission Denied

Former Member
7,967

Details: QuickBooks Enterprise 14.0 MS Access 2013

I have successfully imported several QuickBooks tables into MS Access however when I attempt to import some tables I get the following message: ODBC—call failed. [Sybase][ODBC Driver][SQL Anywhere]Permission denied:you do not have permission to select from “v_SalesOrder” (#-121)

I found this chart:

Permission denied: %1 
Error constant  SQLE_PERMISSION_DENIED
ODBC 2 state    42000
ODBC 3 state    42000
Parameter 1 Description of the type of permission required.
Severity    16
SQLCODE -121
SQLSTATE    42501
Sybase error code   262
  Probable cause
You do not have the required permission to perform the specified action. 
The message specifies the actual permission required and the object being acted upon. 

Can anyone point me where I need to look?

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_willey
Participant

In simple terms, the user (ie the database user id in your ODBC DSN or your connection string) you have used to connect to the SQL Anywhere database doesn't have SELECT rights on the table/view v_SalesOrder. You need to connect with a different user id with the appropriate rights or you could connect as DBA and grant the rights to the user id (e.g. GRANT SELECT ON v_SalesOrder TO <USER ID>)

In SQL Anywhere (like most RDMSs) each database user can be given different rights to the various objects in the database - i.e. some users may be given all rights to everything, others just allowed to read data from a sub-set of tables.

What I can't tell you is whether QuickBooks will allow you to do that - it maybe that the user rights they are giving simply won't permit that. You would need to contact your QB support.

Former Member
0 Kudos

QuickBooks support could NOT come through. I have QB admin privileges and I gave myself QB table access to the "QBReportAdminGroup" and all other available groups. And then I had access to all the QBReportAdminGroup tables. In MS Access I could see QBAdvancedReportGroup tables however even with my QB admin rights, QBAdvancedReportGroup was not even listed as an available group to give myself access. One QB user said these tables weren't available. Thank you...your answer helped me to clarify my thoughts...

VolkerBarth
Contributor
0 Kudos

Is there a possibility that "v_SalesOrder" is not a table but a view and you have not granted permission to views? I'm not sure whether MS Access would show/list views in the same way as tables...

VolkerBarth
Contributor
0 Kudos

In MS Access I could see QBAdvancedReportGroup tables however even with my QB admin rights, QBAdvancedReportGroup was not even listed as an available group to give myself access.

If my understanding is correct, then "QBAdvancedReportGroup" is a SQL Anywhere user group. Such a group won't be listed in MS Access because MS Access has a totally different user/group management concept. It should be sufficient to grant the permissions on the SQL Anywhere side, and then the corrsponding tables/views/stored procedures and the like should be listed in MS Access. Do you use its Table Import Wizard?