Originariamente inviato da rombetto
per esempio ....uno che venga sopportato da aruba...asp io ne ho scaricato uno ma non mi funziona sai perchè ...questi sono i file che ci sono
************************************************
** Update Notes
************************************************
Fixed some problems with IE caching the data
being send and received by the client.
************************************************
** File description
************************************************
ado.asp :Include file for database handling
database.asp :Handling of all request from the flash file
messageboard.fla :Source file for messageboard
messageboard.html :HTML file with the messageboard.swf embedded
messageboard.swf :the compiled FLA
msgboard.mdb :Access 2000 database file holdin the messageboard
questo è ADO
<%
'************************************************* *******************************************
'** Return result from a SQL request in an array
'************************************************* *******************************************
function DBretrive(strsql)
dim objrec
on error resume next
set ObjDB = server.CreateObject("ADODB.connection")
ObjDB.Open strDBname, strDBuser, strDBpwd
set ObjRec = ObjDB.Execute(strsql)
if err <> 0 then
response.write("
ERROR:
------------------------------------------------------
")'
response.write(strsql & "
")
response.write("
" & err.description & "
-------------------------------------------------------
")
end if
if not objRec.eof then
DBretrive = ObjRec.getrows()
end if
ObjDB.Close
objDB = null
end function
'************************************************* *******************************************
'** Execute a SQL statement
'************************************************* *******************************************
function DBexecute(strsql)
dim objrec
on error resume next
set ObjDB = server.CreateObject("ADODB.connection")
ObjDB.Open strDBname, strDBuser, strDBpwd
' set ObjRec = ObjDB.Execute(strsql)
ObjDB.Execute(strsql)
if err <> 0 then
response.write("
ERROR:
------------------------------------------------------
")
response.write(strsql & "
")
response.write("
" & err.description & "
-------------------------------------------------------
")
end if
ObjDB.Close
objDB = null
end function
%>
questo è il database
<%@ Language=VBScript %>
<%
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
'** How to access the database, using a DSN-les connection
dbpath = Server.MapPath("msgboard.mdb")
strDBname = "Driver={Microsoft Access Driver (*.mdb)}; UID=admin; DBQ=" & dbpath
strDBuser = ""
strDBpwd = ""
'** Get the action, send from the clinet
dbaction = request("dbaction")
select case dbaction
case "postmessage"
'** insert a new message into the table
strsql = "insert into msg (poster,message) values ("
strsql = strsql & "'" & request("poster") & "',"
strsql = strsql & "'" & request("message") & "')"
dbexecute(strsql)
Response.Write("Result=ok")
case "readmessages"
'** read all the messages and return them to the client
ArrayAllMessages = dbretrive("Select id,poster,message from msg order by id desc")
if isarray(ArrayAllMessages) then
Response.Write("RecordCount=" & ubound(ArrayAllMessages,2) & "&")
for a = 0 to ubound(ArrayAllMessages,2)
Response.Write("MessageId" & a & "=" & ArrayAllMessages(0,a) & "&")
Response.Write("MessagePoster" & a & "=" & ArrayAllMessages(1,a) & "&")
Response.Write("MessageContent" & a & "=" & ArrayAllMessages(2,a) & "&")
next
Response.Write("Error=0&")
else
Response.Write("Error=1&")
end if
Response.Write("Result=ok")
case "DeleteMessage"
'** delete a message from the database
dbexecute("Delete from msg where id=" & request("messageID"))
Response.Write("Result=ok")
end select
%>
puoi aiutarmi