If you are using IS6.x,you can create a flatfileschema based on the table results retrieved using JDBCAdapter or WmDB and ff layout as required using WmFlatFileAdapter (convertToString references FFschema to build a flatfile string) this option will be faster and easier.
Using JS parsing option its a tds work.
Can you elaborate more on your table and flatfile layout,so we can suggest if feisable.
HTH,
RMG
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services