I am accessing an ODBC data source using INTERSOLV OEM 3.11 DBase driver. I would like to use FASTINSERT to insert a 70-row column into the database as follows:
% Set up ODBC data source using INTERSOLV OEM 3.11 DBase driver
conn=database('Tracker2009','','')setdbprefs('DataReturnFormat','cellarray')ping(conn)%To read data:
curs=exec(conn,'select * from Tracker2009')curs = fetch(curs, 10)Data=curs.Data% Reading data worked fine
% To write data:
colnames={'Run number','Author','Requestor','Date','Time','Run type','Run comment', ... 'Purpose','Wafer #','Serial number','Order #','Recipe','Recipe comment', ... 'Stack','Structure','Substrate type','Substrate comment'};for i=1:53; colnames{i+17}=['Layer' num2str(i)];endexdata(1,1)={'YG003'};exdata(1,2)={'DWA'};exdata(1,3)={'SLB'};exdata(1,4)={'10/31/2009'};exdata(1,5)={'12:12:12'};exdata(1,6)={'Dev'};exdata(1,7)={'This is first inserted data'};exdata(1,8)={'Because I say so'};exdata(1,9)={'03'};exdata(1,10)={'ZABCDMA'};exdata(1,11)={'2'};exdata(1,12)={'R100'};exdata(1,13)={'Forget the recipe'};exdata(1,14)={'500TaN|60Ru|3x{2Co|5Pd}'};exdata(1,15)={'BASE|SPACER|FREELAYER'};exdata(1,16)={'SiN'};exdata(1,17)={'.'};for i=1:53;exdata(1,i+17)={'.'};end% Insert data
fastinsert(conn, 'tracker2009', colnames, exdata)
However, I observe the following error:
??? Java exception occurred: java.sql.SQLException: [INTERSOLV][ODBC dBase driver]Column names in an INSERT statement must be followed by a ',' or ')' at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLPrepare(Unknown Source) at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(Unknown Source)
Best Answer