Hi,
This is just a suggestion...but after you query your database you can just
initialize the secondary datasource DOM yourself. This is made even easier if
you query the datasource by the yourDataSourceVariable.Query method since
right after it queries you can check if they are null and fill them with
default values...other than that you could alter the xml file of your
database I think. When you extract form files there are initialization xml
files. template.xml is used for your form's default values your secondary
datasource also has them. There should be posts on extracting form files and
zipping them back up with cabarc.exe (your .xsn file is just a zipped file of
all these other xsl, xsd, and xml files) To unzip it you go into design
mode-> File-> extract form files...then you either run the manifest.xsf file
or you have to rezip all the extracted files into an xsn file. The second
method is more grueling but much more 'proffessional' i think, and run time
will be quicker for sure.