Welcome, Guest. Please login or register.
Did you miss your activation email?
03/21/10, 15:00
Home Help Search Login Register
News:
Loading and saving data to different external resources (txt files, databases) using AS3

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  MySQL, PostgreSQL, MS SQL, Access (Moderators: Flash-db, Musicman, Ronald Wernecke, Jorge Solis, Andries Seutens)
| | |-+  Previous/Next record from Access database
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Previous/Next record from Access database  (Read 821 times)
bobmonkhouse
Server what's that
*
Posts: 1


View Profile
« on: 01/26/10, 10:10 »

Hi there,
Wonder if anyone can help?
I have managed to search an access database using Flash 8, but I'm struggling to figure out how to get  Previous/Next record buttons.
My asp file is as follows:

<%
Sub OutputParam ( key , value )

if ( value <> null & Len(value) <> 0 ) then
    Response.Write "&" & key & "=" & server.URLEncode( value )
end if



End Sub



record=request("Record")
Set objconn=server.createobject("adodb.connection")
objconn.open "provider=microsoft.jet.oledb.4.0; data source=" & server.mappath("Calm Support Database.mdb")
set objrecord=server.createobject("adodb.recordset")


set objrecord=objconn.execute("SELECT Main.* FROM Main WHERE (Main.Organisation Like ""%"& Record &"%"");")


if objrecord.eof then

Response.Write "errorMsg=Not Found&Organisation="
response.end
else


Response.Write "errorMsg=Found"
OutputParam "Organisation", objrecord.Fields("Organisation")
OutputParam "Account Ref", objrecord.Fields("Account Ref")
OutputParam "Invoice Address", objrecord.Fields("Invoice Address")
OutputParam "Delivery Address", objrecord.Fields("Delivery Address")



end if

%>

Behind the search button in Flash is:



on (release , keyPress "<Enter>") {
 {
   loadVariablesNum("data.asp?Record=" add myrecord, 0);
   myrecord="";
   Organisation="";
   errorMsg="Please wait";
   }
   

}


If anyone's got an idea as to the best method I'd be very grateful.
thanks.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!