Security restrictions are way different for a browser form than a rich client form, which is why it works in Preview mode (rich client) but not in browser mode.
We've had this same question several times recently on multiple forums, and unfortunately it is just not a straightforward thing to resolve. Qdabra created their DBXL tool specifically to fill this gap, but if you want to get it working on your own, then you'll need to focus on a few areas - all security-related:
1) Make sure your web service data connection is converted to UDC
2) Create an SSO entity in Central Admin for the connection to the DB
3) Modify the UDC file from #1 with the proper credential mapping for the account that should be used to connect to the DB
I wish I could point you to the step-by-step methods, but I don't remember where I found them originally. I found all this when I first did what you are attemping, and it took a while, but it all worked in the end. I was ble to read and write to a SQL DB from a browser form through a web service, which is what you want to do. I found my way to each blog by researching the errors I encountered. Unfortunately, though, you don't seem to have gotten an error?