I ran your form "as is" and it worked fine. When I tried to modify to insert data into a SQL db, I got a HTTP 500 error. Here's my code:
<%
' Declaring variables
Dim company, address1, city, state, data_source, con, sql_insert
' A Function to check if some field entered by user is empty
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
' Receiving values from Form
name = ChkString(Request.Form("company"))
email = ChkString(Request.Form("address1"))
country = ChkString(Request.Form("city"))
comments = ChkString(Request.Form("state"))
data_source = "Provider=SQLOLEDB; Data Source=MYSERVER; Initial Catalog=CATALOG; User Id=ID; Password=password"
sql_insert = "insert into TABLE (company, address1, city, state) values ('" & _
company & "', '" & address1 & "', '" & city & "', '" & state & "')"
' Creating Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
' Done. Close the connection
con.Close
Set con = Nothing
Response.Write "All records were successfully entered into the database."
%>