Now let’s use Python to create the table and add data
connection = odbc.odbc('d0db/white/mypassword')
cursor = connection.cursor()
print "running python database create/insert program"
sql = 'create table toy_calib (\
id number(6,0) not null,\
channel_no number(4,0) not null,\
chip_no number(3,0) not null,\
sql = 'insert into toy_calib \
(id, channel_no,chip_no,name,pedestal,ref_value,some_date) \
values (:1, :2, :3, :4, :5, :6, :7)'
rec = (1,1,1,'chan1',13.004,13.000,'01-Dec-1997')
status = cursor.execute(sql,rec)