At the beginning i wrote a c# class. Then i created a schema for the class with the “xsd.exe” tool. I posted this schema into the schema collection of my database and created a new xml column:
CREATE XML SCHEMA COLLECTION AppointmentSC AS 'its impossible to insert a schema here in the forum' GO
ALTER TABLE Adresse ADD xmlAppointment XML(AppointmentSC); GO
Now i can serialize/deserialize an object of my class into/out of my database. In the next step i want to save more then one object of my class into the database. I could create a collection for my class, but I also want to add new objects with sql only. I think I need an autoincrement id or a primary key or something like that. Every attempt to create a unique-id in my schema was hopeless.
I’m using Visual Studio 2008 and SQL Server 2008
best regards Raimund