sqlwrite object already exists
7 views (last 30 days)
Show older comments
Commented: Jakob B. Nielsen on 26 May 2021
Greetings excellent people!
(I am aware that a question already exists with roughly the same name, but it is several years old and does not seem to pertain to my problem).
I have run into the following error:
Error using database.odbc.connection/sqlwrite (line 144)
ODBC Error: ODBC Driver Error: ODBC Driver Error: [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'Declared_values' in the
Now, the sqlwrite function documentation says that if a table already exists in the sql database, the function appends the data in the MATLAB table as rows in the existing database table. I am at a loss here! I would welcome any suggestions. I have checked spelling, capital/noncapital letters, conn.message returns , and I can both find and edit the database in Microsoft SQL Server Manager, which means I have edit rights. If I run
test = sqlread(conn,tablename);
It gives me the proper data from the table. But
returns the error above.
I would very much appreciate any insight you can give me in this regard!
Find more on Import Data Programmatically in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!