nutype
August 11, 2004, 7:48am
1
Hello everyone, I’m in dire need of help.
I currently have a form in flash that needs to be updated. I can pull data from my ASP page (through a filemaker DB) into flash and even run a search against it. However, I’m having trouble creating the update functionality. If somebody could point me in the right direction or get me started, you will have my eternal gratitude!
Please help!
what do you need ?
how to write update code in asp
or how to call the update.asp correctly ?
nutype
August 20, 2004, 8:35am
3
Amitgeorge,
I was able to figure it out. Didn’t realize it was much easier than I thought. Anyway this is what I came up with:
<%
Dim registration, oConn, lname, sqlString
ID = request.QueryString("ID")
'lname = Lcase(lname)
'sqlString = "SELECT * FROM Registration where NameLast = '" & lname & "'"
sqlString = "SELECT * FROM Registration where ID = '" & ID & "'"
'sqlString = Lcase(sqlString)
Set registration = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "AllAsText=0;ApplicationUsingThreads=1;Driver=FileMaker Pro;FetchChunkSize=100;FileOpenCache=0;IntlSort=0; MaxTextlength=255;ServerAddress=127.0.0.1;TranslationOption=0;UseRemoteConnection=1" & Server.MapPath("registration.fp5")
oConn.Open
registration.Open sqlString, oConn, 2, 3
'registration.AddNew
'registration("nameFirst") = request.Form("NameFirst")
'registration("nameLast") = request.Form("NameLast")
registration("jobTitle") = request.QueryString("jobTitle")
registration("company") = request.QueryString("company")
registration("addressOne") = request.QueryString("addressOne")
registration("city") = request.QueryString("city")
registration("state") = request.QueryString("state")
registration("zip") = request.QueryString("zip")
'registration("JobTitle") = request.Form("JobTitle")
registration.Update
if registration.EOF Then
Response.Write "&success=false"
Else
Response.Write "&success=true"
End If
registration.Close
Set registration = Nothing
oConn.Close
Set oConn = Nothing
%>