Hi Stefan
Habs jetzt ein wenig anders gelöst und es funktioniert: (müßte ja passen oder?) :
<%
Dim lngID
Dim conn, rs
Dim strConnection
strConnection = Application("Immo_ConnectionString")
Set conn = CreateObject("ADODB.Connection")
conn.Open strConnection
Set rs = CreateObject("ADODB.Recordset")
rs.CursorLocation = 2 ' adUseServer
rs.CursorType = 1 ' adOpenKeyset
rs.LockType = 3 ' adLockOptimistic
strSQL = "SELECT * FROM Immo WHERE ID = 0"
rs.Open strSQL, conn
rs.AddNew
rs("Wohnflaeche") = Request.Form("Wohnflaeche")
rs("Zimmer") = Request.Form("Zimmer")
rs.Update
lngID = rs("ID")
rs.Close
conn.Close
Response.Write "Die ID ist: "
Response.Write lngID & "<br>" & vbCrLf
Set rs = Nothing
Set conn = Nothing
%>
Mfg
Markus