When I test this page on my local machine, it works fine. After uploading (including the database) - I get the following error after trying to insert a new record:
-----------error message--------------
ODBC Error Code = 23000 (Integrity constraint violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'AddonID', table 'eldb.dbo.OrderAddons'; column does not allow nulls. INSERT fails.
-----------/error message--------------
I have the AddonID specified in a dropdown menu so it should not be passing a NULL value (and it doesn't on my local machine).
The only difference between my local machine & hosting company is that I'm using Coldfusion MX and they are using Coldfusion 4.5
Also, here is the code for the dropdown menu:
<cfquery name="Addons" datasource="eldb">
SELECT * FROM dbo.AvailableAddons
left join OrderAddons on OrderAddons.AddonID = AvailableAddons.AddonID
</cfquery>
-------------------
<select name="AddonID" class="formareasinput">
<cfoutput query="Addons">
<option value="#Addons.AddonID#">#Addons.AddonName#</option>
</cfoutput>
</select>
Any ideas?
It was the "inner join" part that was messing things up. All I needed to do was change it to:
----
SELECT *
FROM AvailableAddons
---
Simple as that!