I am trying to insert data into an SQL database, but do not have the database toolbox. I approached the issue similar to the example given in https://www.mathworks.com/matlabcentral/answers/323587-error-when-inserting-data-into-database-without-toolbox. I am receiving the following error message:
*No method 'Execute' with matching signature found for class 'COM.ADODB_Connection'.Error in SQL_Practice (line 38)SynergyInsert = conn.Execute(sqlinsert);*
I am running R2015a and my code is shown below:
sqlquery1 = ['SELECT * FROM cct_pcm_test_results '];conn = actxserver('ADODB.Connection');conn.Open('driver={ABC Server}; server=123.123.123; port=123; dns=123_ABCDE');conn.Execute('use [123_ABCDE]'); SynergyTable1 = conn.Execute(sqlquery1).GetRows();Inserted = {acell, TC, frz, melt, frzminpass, frzmaxpass, meltminpass, meltmaxpass,... npfrz, npmelt, frzslope, meltslope};sqlinsert = ['INSERT INTO cct_pcm_test_results (test_no, tc_no, frz_temp, melt_temp, frz_min_pass, frz_max_pass, melt_min_pass, melt_max_pass, frz_data_point_cnt, melt_data_point_cnt, frz_slope, melt_slope)' ... 'VALUES ' (Inserted)];SynergyInsert = conn.Execute(sqlinsert);
Best Answer