<%@ Language=VBSCRIPT %> <% Option Explicit %> <% On error resume next Dim RS ‘ Declare Recordset Dim ConnStr ‘ Declare Connection String Dim RecordCounter Dim FDFAcx, FDFin Set RS = Server.CreateObject(“ADODB.Recordset”) ConnStr = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=” & Server.MapPath(“/Databases/My_Database.mdb”) ‘ Open Updatable Recordset Syntax is as follows ‘ RS.Open SQL/Table, Connection, 3=OpenKeyset, 3=LockOptimistic RS.Open “Select * From Table_One Where Unique_ID = 2”, ConnStr, 3,3 ‘ Check if a record is found RecordCounter = RS.RecordCount If RecordCounter < 1 then response.write “no records found” response.end end if ‘ call subroutine to perform data population perform_query sub perform_query() response.contenttype = "application/vnd.fdf" set fdfacx = server.createobject("fdfapp.fdfapp") set fdfout = fdfacx.fdfcreate fdfout.fdfsetfile = server.mappath(“pdfs/my_pdf.pdf”) ‘ 1. open fdf from file or open from buffer (uncomment one of them) ‘ set fdfin=fdfacx.fdfopenfromfile(server.mappath(“/pdf/my_file.pdf”)) ‘ set fdfin = fdfacx.fdfopenfrombuf (request.binaryread(request.totalbytes)) ‘ if the field type is a string then add a empty string to the end to not throw an error fdfout.fdfsetvalue “fieldname_one”, rs(“fieldname_one") & “” ‘ if the field type is numeric then add zero to not throw an error fdfout.fdfsetvalue “fieldname_two”, rs(“fieldname_two”) + 0 fdfout.fdfsetstatus “page updated with new values” response.binarywrite fdfout.fdfsavetobuf fdfacx.close respone.end end sub %>