Jump to content

Form to CSV


benjancewicz

Recommended Posts

So, I've got this script for building a CSV file (from a form) that I'm trying to pick apart and figure out.Here's the form: http://www.fatherhood.org/magicform.aspHere's the code from magiformprocess.asp

''''''''''''''''''''''''''''''''''''''''''This gets all the values entered in the form.'''''''''''''''''''''''''''''''''''''''''strAdminEmail = Request.Form("AdminEmail")strUserEmail = Request.Form("UserEmail")strtext = Request.Form("Text")'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Store data in database'''''''''''''''''''''''''''''''''''''''''set conn	= db.ActiveConnectionfor each thing in split(strUserEmail, ",")	thing		= trim(thing)	set RS	= conn.execute("INSERT INTO magicform.csv(UserEmail, Text) VALUES(" & NIB(StrUserEmail) & ", " & NIB(StrText) & "); Select @@Identity as Identifier ")	set rsID = rs.NextRecordset	intIDvalue = rsID("Identifier")nextkill connIf len(intIDvalue) > 0 Then  URL = replace(URL, "[iD_HERE]",intIDvalue)Else  Response.Write "There was a problem getting intIDvalue "End If

But, I get this error:

 	Tell a Friend Tell a Friend  Email This Page to a Friend Email  Print This Page PrintMicrosoft OLE DB Provider for SQL Server error '80040e37'Invalid object name 'magicform.csv'./magicformprocess.asp, line 164 

What am I doing wrong?

Link to comment
Share on other sites

Not really sure, but think its because of period [.]in the table name. did you have similar trouble before with the table name? try INSERT INTO [magicform.csv](UserEmail......Also try to print out the SQL query and see if its in the correct format.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...