For a browser based form you must use a UDC.
In the designer use the convert button on the data connection and make sure the UDC works that way.
The other problem you can run into is that if the SQL is not on the same server as Sharepoint the permissions do not get passed correctly. Since InfoPath Form Services is actually hosting the form it does not send your credentials to external servers correctly.
This is a known issues with IIS called "double hop" you can research this term to find more info.
www.infopathdev.com is a good resource.