The explanation that comes first to mind is that the user has permission to create views in database A, but not in database B. CREATE VIEW is a fairly hefty permission, so it is nothing to take for granted.
Error "-2147217900 CREATE VIEW" when getting data from SQL Server
Hello,
I'm using Excel VBA to connect to SQL Server and get accounting data from accounting software. There are several databases (companies) in accounting software, but they all look alike.
Whenever I connect to database (company) "A" with User ID, password, SQL query, I get recordset and can analyse the data. However, when I connect to database (company) "B" with the same User ID, password and SQL query, I get error message.
I made some checks and found that SQL Query code is the same both in database "A" and "B", parameters of SQL are also the same. User exists both in database "A" and "B".
What could be the problem and how can I solve it?
2 additional answers
Sort by: Most helpful
-
m 4,271 Reputation points
2020-09-04T07:36:06.33+00:00 Hi @waldux ,
What could be the problem and how can I solve it?
1.Please make sure you have tested with the correct database path;(You can clear the cache and refresh then connect again,maybe it save the first db path as the second one)
2.If there are spaces in your column name as Column Name , please change it as [Column Name] to have a test.This case may be helpful: run-time-error-2147217900-80040e14-automation-error
BR,
Mia
If the reply is helped, please do “Accept Answer”. -
m 4,271 Reputation points
2020-09-07T06:40:56.913+00:00 Hi @waldux ,
Is the issue solved?
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.BR,
Mia