sorry Gaz i can see how to get this into my code at the moment??? not that good with ASP but am learning all the time i have tried the following
- <%'Read in the value of the TEXTAREA
-
Dim textnew
-
textnew = Request.Form("body2")
-
'Replace all vbCrLf with <BR>s
-
-
textnew = Replace(textnew, vbCrLf, "<BR>")
-
-
'Replace all spaces with
-
-
textnew = Replace(textnew, " ", " ")
-
%>
-
-
<%
-
Response.Expires=0
-
Set mailConnection=Server.CreateObject("ADODB.Connection")
-
DatabaseDetails="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("../../private/mailouts.mdb") & ";"
-
mailConnection.Open DatabaseDetails
-
mailQuery="SELECT * from mailouttext"
-
Set mailRecordset=mailConnection.execute(mailQuery)
-
mailRecordset.AddNew ' Add a new row to the recordset (not the table)
-
mailRecordset("mailtext") = "textnew" ' Insert some data
-
' Add more fields
-
mailRecordset.Update 'Save your changes
-
mailRecordset.MoveLast 'Go to the record you just created
-
-
Response.Write mailRecordset("ID") 'This should let you grab the ID (assuming it is auto incremented by the DB)
-
-
%>
but it comes back with the following
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/mailout/mailoutemail.asp, line 20
line 20 is the addnew line