in ASP schön und gut aber wie das ganze in .NET?

Gruss
Pat


Claudius Ceteras wrote:
jo eigener Code, aber nach dem einfügen bringt ja nur die letzte ID.


Nach jedem Insert holst Du die letzte Identity...

Id = InsertRS("DieTabelle", _
                array("feld1","feld2"), _
                array(1,"wert2"), _
                "ID")

Function InsertRS(table,fields,values,PK)
        dim rs
        Set rs = Server.CreateObject("ADODB.Recordset")
        rs.CursorLocation = 3'adUseClient
        rs.CursorType = 3'adOpenStatic
        rs.LockType = 3'adLockOptimistic
        rs.Open "SELECT * FROM " & table & " WHERE 0=1", Application("DB")
        rs.AddNew fields, values
        rs.Update
        InsertRS = rs(PK)
        rs.Close
        Set rs = Nothing
End Function

Und speicherst die irgendwo, z.B. In ner Dictionary...

Dic(id) = 0


alleIDs = Dic.Keys


Gruss,

Claudius

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net



--


______________________________

boingMedia e.K.

Staufenstr. 5
D-73037 Göppingen

Fon: ++49(0)-7161 98 39 31
Fax: ++49(0)-7161 98 73 72 3

______________________________

www.boingmedia.de
______________________________

This message and/or attached documents may contain
confidential and privileged information and should only be
read by those persons to whom this message is addressed.
This message is copyright to boingMedia and disclosure,
copying or forwarding this message and attachments without
the owner's approval is prohibited and may be unlawful. If you
have received this message in error, please notify the sender
via return email and delete the original message from any
computer. Thank you for your co-operation.

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an