> Im trying to take a form - and send it to two places...[color=blue]
> I'd like the form data to go to a database as well as email
> the form results...[/color]
Sure, what is the problem you're having?
[color=blue]
> body = body & "Name: " & Request.Form("requiredname") & vbCrLf
> body = body & "Address: " & Request.Form("Address") & vbCrLf
> body = body & "City: " & Request.Form("City") & vbCrLf
> body = body & "State: " & Request.Form("State") & vbCrLf
> body = body & "Zip: " & Request.Form("Zip") & vbCrLf
> body = body & "Country: " & Request.Form("Country") & vbCrLf
> body = body & "Phone #: " & Request.Form("requiredphone") & vbCrLf
> body = body & "Email: " & Request.Form("requiredemail") & vbCrLf
> body = body & "Fax #: " & Request.Form("Fax") & vbCrLf
> body = body & "Comments: " & Request.Form("Comments") & vbCrLf[/color]
Okay, so you build up the body here, why can't you also build out a SQL
statement?
sql = "INSERT INTO tableName(columnName, ...) VALUES('" &
replace(request.form("requiredname"), "'", "''") & "', ...")
set conn = CreateObject("ADODB.Connection")
conn.open connectionString ' see
http://www.aspfaq.com/2126
conn.execute sql, , 129
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/