Micro Focus QTP (UFT) Forums
Function writes data from datatable to database - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Function writes data from datatable to database (/Thread-Function-writes-data-from-datatable-to-database)



Function writes data from datatable to database - Fairbanks - 06-27-2014

Hi,

In an effort to give all users the ability to use certain data scenarios. I want to develop a function for a user to take a data scenario off their datasheet and write it to our access database for others to use. Then assign it a data scenario number (which is just the PK number in our db) in our access database and return it to a column in the datasheet.

So datasheet --> database --> returns scenario # to user in datasheet

The formatting will be identical (as far as column names). So i assume i need a sql string to change dynamically so it can write the correct fields to the access db.

Just not sure exactly how to go about starting this as the function will have to be quite dynamic. Has anyone done this before? Perhaps im over complicating it

Thanks!