hi, kann mir einer von euch sagen, wie ich folgendes script auch ohne ODBC öffnen kann? was muß ich da umbauen, damit der server direkt auf die datenbank zugreift, ohne odbc-hilfe?
------------------ START -------------------
<html>
<head>
<title>Eingabe</title>
</head>
<body>
<%
function rw(text)
response.write text & ""
end function
IF request.form("passwort") = "d" THEN session("valid")=TRUE
IF session("valid")=FALSE THEN %>
<form action="eingabe.asp" method="POST">
Passwort : <input type="Password" name="passwort"><input type="Submit" name="sub" value="ok">
</form>
<% ELSE
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "test", "sa", ""
IF request("new")<>"" OR request("new2")<>"" THEN
SQL = "INSERT INTO t_news (textfeld, textfeld2) VALUES('" & replace(request("new"), "'", "''") & "','" & replace(request("new2"), "'", "''") & "')"
SET xbut = conn.Execute(SQL)
END IF
IF (request("old")<>"" OR request("old")<>"") AND request("ID")<>"" THEN
SQL = "UPDATE t_news SET textfeld = '" & replace(request("old"), "'", "''") & "', textfeld2='" & replace(request("old2"), "'", "''") & "' WHERE ID = " & request("ID")
SET xbut = conn.Execute(SQL)
END IF
IF request("kill")<>"" THEN
SQL = "DELETE FROM t_news WHERE ID = " & request("kill")
SET xbut = conn.Execute(SQL)
END IF
%>
<form action="eingabe.asp" method="POST">
<textarea name="new" cols="80" rows="10" wrap="PHYSICAL"></textarea>
<textarea name="new2" cols="80" rows="10" wrap="PHYSICAL"></textarea>
<input type="Submit" name="sub" value="neuen Eintrag hinzufügen">
</form>
<HR>
<%
SQL = "SELECT ID, textfeld, textfeld2 FROM t_news ORDER BY datum DESC"
SET xbut = conn.Execute(SQL)
IF xbut.eof = TRUE THEN
rw "sorry,... Keine Eintragungen gefunden...!"
END IF
DO WHILE NOT xbut.EOF %>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>
<form action="eingabe.asp?id=<%=xbut("id")%>" method="POST">
<a href="eingabe.asp?kill=<%=xbut("id")%>" target="_self">löschen</a><br>
<textarea name="old" cols="80" rows="10" wrap="PHYSICAL"><%= xbut("textfeld") %></textarea>
<textarea name="old2" cols="80" rows="10" wrap="PHYSICAL"><%= xbut("textfeld2") %></textarea>
<input type="Submit" name="sub" value="ändern"></form>
</td></tr></table><br>
<%
xbut.MoveNext
LOOP
xbut.close
conn.close
SET xbut = Nothing
SET conn = Nothing
END IF
%>
</body>
</html>
------------------ ENDE -------------------