Hi,
For make this possible you have to connect your database as a secondary datasource in infopath design! But at the last screen of the wizard uncheck "autmatically retreive..." after that go on your drop down properties and bind it to the datasource.
And in the code write only this line:
thisXDocument.DataObjects["thenameofyourdatasource"].Query();
But with this you can't create your custom SQL request in your database it's always the same!
++
Thierry
Every moment hesitated is a moment gone for life!!! Think about it
Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
merci de lire ceci