I've been using the UDCX files for my Data Connections in my InfoPath form and for the Form Submit Action it came up with an error if I resubmitted the form:
A value in the form may be used to specify the file name. If you know the value in the form that specifies the file name, revise it and try again. Otherwise, contact the author of the form template.
At first I didn't know where to start but then I realised that I hadn't checked the option in the setup when I converted it to a udcx file.

if you're not using udcx files you can simply tick the tick box and it'll fix your error.
Basically I found the xml in the udcx file and changed it and for everyone's reference its. The element can be found at:
<udc:FolderName AllowOverwrite="0" />
and just change it to:
<udc:FolderName AllowOverwrite="1" />
So a full sample file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<?MicrosoftWindowsSharePointServices ContentTypeID="0x010100B4CBD48E029A4ad8B62CB0E41868F2B0"?>
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name>Main submit</udc:Name>
<udc:Description>Format: UDC V2; Connection Type: SharePointLibrary; Purpose: WriteOnly; Generated by Microsoft Office InfoPath 2007</udc:Description>
<udc:Type MajorVersion="2" MinorVersion="0" Type="SharePointLibrary">
<udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
</udc:Type>
<udc:ConnectionInfo Purpose="WriteOnly" AltDataSource="">
<udc:WsdlUrl/>
<udc:SelectCommand>
<udc:ListId/>
<udc:WebUrl/>
<udc:ConnectionString/>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Query/>
</udc:SelectCommand>
<udc:UpdateCommand>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Submit/>
<udc:FileName>Specify a filename or formula</udc:FileName>
<udc:FolderName AllowOverwrite="1">http://testurl/</udc:FolderName>
</udc:UpdateCommand>
<!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->
</udc:ConnectionInfo>
</udc:DataSource>