Hello
I would like to insert a dataset (shown below with 2 rows and 10 columns) into a database but I am not how to do this!
I have tried this script but it is not working:
data= self.view.custom.part.spec.data #sample Dataset [12R ? 10C]
pds = system.dataset.toPyDataSet(data) #sample <PyDataset rows:12 cols:10>
for index in range(len(pds)):
rowData=list(pds[index])
system.db.runPrepUpdate("INSERT INTO testdatabase (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) VALUES (?,?,?,?,?,?,?,?,?,?)", rowData)
The dataset table (2 rows and 10 columns):
I greatly appreciate any information you could share with me.