|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Hi,
I have spent the last two days trying to write a class which will act as a database table. I will be able to add, delete and update records. Does anyone have a sample of this kind of data management? Aristotelis Pitardidis,
What you have in mind? Do you want to do that on disk, than you cannot do that with an XML, do you want that in memory, you can simply use the DataSet. But than read and write the complete everytime the Dataset and therefore you can only use this for Single User applications. I hope this gives an idea, Cor "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht news:1151564031.37565@athnrd02...Show quoteHide quote > Hi, > > I have spent the last two days trying to write a class which will act as a > database table. I will be able to add, delete and update records. Does > anyone have a sample of this kind of data management? > > Aristotelis > I want to keep the data in memory. When the application will finish I will
call the appropriate member function in order to save the data. I know that this type of data management will be single user application but it works fine for my project. My primary problem is that it does not save the last values that I added in the DataSet. An other problem is that if I delete all the records, the table disappears. If I had a proper example of XML table management, I would change it in order to work with my problem. Aristotelis Show quoteHide quote Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... > > Pitardidis, > > What you have in mind? > > Do you want to do that on disk, than you cannot do that with an XML, do > you want that in memory, you can simply use the DataSet. But than read and > write the complete everytime the Dataset and therefore you can only use > this for Single User applications. > > I hope this gives an idea, > > Cor > > "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht > news:1151564031.37565@athnrd02... >> Hi, >> >> I have spent the last two days trying to write a class which will act as >> a database table. I will be able to add, delete and update records. Does >> anyone have a sample of this kind of data management? >> >> Aristotelis >> > > Datasets should keep changes and won't destroy the table if you destroy all
rows. I would suggest first to post about how to solve these particular problems problems before trying to create your own replacement (my first guess would be that you don't save the schema but just the data, not sure what it could be for the first point)... -- Patrice "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message de news: 1151570269.871751@athnrd02...Show quoteHide quote >I want to keep the data in memory. When the application will finish I will >call the appropriate member function in order to save the data. I know that >this type of data management will be single user application but it works >fine for my project. > > My primary problem is that it does not save the last values that I added > in the DataSet. > > An other problem is that if I delete all the records, the table > disappears. > > If I had a proper example of XML table management, I would change it in > order to work with my problem. > > Aristotelis > > Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá > news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >> >> Pitardidis, >> >> What you have in mind? >> >> Do you want to do that on disk, than you cannot do that with an XML, do >> you want that in memory, you can simply use the DataSet. But than read >> and write the complete everytime the Dataset and therefore you can only >> use this for Single User applications. >> >> I hope this gives an idea, >> >> Cor >> >> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >> news:1151564031.37565@athnrd02... >>> Hi, >>> >>> I have spent the last two days trying to write a class which will act as >>> a database table. I will be able to add, delete and update records. Does >>> anyone have a sample of this kind of data management? >>> >>> Aristotelis >>> >> >> > > The table will be destroyed when I delete all the data, save the dataset and
close the application. The next time that I will try to read data from the XML file, the table will not be there. Show quoteHide quote Ï "Patrice" <scr***@chez.com> Ýãñáøå óôï ìÞíõìá news:Olc3Vu1mGHA.1852@TK2MSFTNGP03.phx.gbl... > > Datasets should keep changes and won't destroy the table if you destroy > all rows. I would suggest first to post about how to solve these > particular problems problems before trying to create your own replacement > (my first guess would be that you don't save the schema but just the data, > not sure what it could be for the first point)... > > -- > Patrice > > "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message de > news: 1151570269.871751@athnrd02... >>I want to keep the data in memory. When the application will finish I will >>call the appropriate member function in order to save the data. I know >>that this type of data management will be single user application but it >>works fine for my project. >> >> My primary problem is that it does not save the last values that I added >> in the DataSet. >> >> An other problem is that if I delete all the records, the table >> disappears. >> >> If I had a proper example of XML table management, I would change it in >> order to work with my problem. >> >> Aristotelis >> >> Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá >> news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >>> >>> Pitardidis, >>> >>> What you have in mind? >>> >>> Do you want to do that on disk, than you cannot do that with an XML, do >>> you want that in memory, you can simply use the DataSet. But than read >>> and write the complete everytime the Dataset and therefore you can only >>> use this for Single User applications. >>> >>> I hope this gives an idea, >>> >>> Cor >>> >>> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >>> news:1151564031.37565@athnrd02... >>>> Hi, >>>> >>>> I have spent the last two days trying to write a class which will act >>>> as a database table. I will be able to add, delete and update records. >>>> Does anyone have a sample of this kind of data management? >>>> >>>> Aristotelis >>>> >>> >>> >> >> > > Aristotelis,
That is normal, if you delete the table than it is not anymore after that. Therefore can you replie this in other words, Cor "Aristotelis Pitaridis" <pitari***@hotmail.com> schreef in bericht news:1151575327.145808@athnrd02...Show quoteHide quote > The table will be destroyed when I delete all the data, save the dataset > and close the application. The next time that I will try to read data from > the XML file, the table will not be there. > > Ï "Patrice" <scr***@chez.com> Ýãñáøå óôï ìÞíõìá > news:Olc3Vu1mGHA.1852@TK2MSFTNGP03.phx.gbl... >> >> Datasets should keep changes and won't destroy the table if you destroy >> all rows. I would suggest first to post about how to solve these >> particular problems problems before trying to create your own replacement >> (my first guess would be that you don't save the schema but just the >> data, not sure what it could be for the first point)... >> >> -- >> Patrice >> >> "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message >> de news: 1151570269.871751@athnrd02... >>>I want to keep the data in memory. When the application will finish I >>>will call the appropriate member function in order to save the data. I >>>know that this type of data management will be single user application >>>but it works fine for my project. >>> >>> My primary problem is that it does not save the last values that I added >>> in the DataSet. >>> >>> An other problem is that if I delete all the records, the table >>> disappears. >>> >>> If I had a proper example of XML table management, I would change it in >>> order to work with my problem. >>> >>> Aristotelis >>> >>> Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá >>> news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >>>> >>>> Pitardidis, >>>> >>>> What you have in mind? >>>> >>>> Do you want to do that on disk, than you cannot do that with an XML, do >>>> you want that in memory, you can simply use the DataSet. But than read >>>> and write the complete everytime the Dataset and therefore you can only >>>> use this for Single User applications. >>>> >>>> I hope this gives an idea, >>>> >>>> Cor >>>> >>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >>>> news:1151564031.37565@athnrd02... >>>>> Hi, >>>>> >>>>> I have spent the last two days trying to write a class which will act >>>>> as a database table. I will be able to add, delete and update records. >>>>> Does anyone have a sample of this kind of data management? >>>>> >>>>> Aristotelis >>>>> >>>> >>>> >>> >>> >> >> > > I do not delete the table. I delete the rows. The table disapears
automatically when there are not records in the table. Aristotelis Show quoteHide quote Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá news:OndI3g2mGHA.1852@TK2MSFTNGP03.phx.gbl... > > Aristotelis, > > That is normal, if you delete the table than it is not anymore after that. > Therefore can you replie this in other words, > > Cor > > "Aristotelis Pitaridis" <pitari***@hotmail.com> schreef in bericht > news:1151575327.145808@athnrd02... >> The table will be destroyed when I delete all the data, save the dataset >> and close the application. The next time that I will try to read data >> from the XML file, the table will not be there. >> >> Ï "Patrice" <scr***@chez.com> Ýãñáøå óôï ìÞíõìá >> news:Olc3Vu1mGHA.1852@TK2MSFTNGP03.phx.gbl... >>> >>> Datasets should keep changes and won't destroy the table if you destroy >>> all rows. I would suggest first to post about how to solve these >>> particular problems problems before trying to create your own >>> replacement (my first guess would be that you don't save the schema but >>> just the data, not sure what it could be for the first point)... >>> >>> -- >>> Patrice >>> >>> "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message >>> de news: 1151570269.871751@athnrd02... >>>>I want to keep the data in memory. When the application will finish I >>>>will call the appropriate member function in order to save the data. I >>>>know that this type of data management will be single user application >>>>but it works fine for my project. >>>> >>>> My primary problem is that it does not save the last values that I >>>> added in the DataSet. >>>> >>>> An other problem is that if I delete all the records, the table >>>> disappears. >>>> >>>> If I had a proper example of XML table management, I would change it in >>>> order to work with my problem. >>>> >>>> Aristotelis >>>> >>>> Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá >>>> news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >>>>> >>>>> Pitardidis, >>>>> >>>>> What you have in mind? >>>>> >>>>> Do you want to do that on disk, than you cannot do that with an XML, >>>>> do you want that in memory, you can simply use the DataSet. But than >>>>> read and write the complete everytime the Dataset and therefore you >>>>> can only use this for Single User applications. >>>>> >>>>> I hope this gives an idea, >>>>> >>>>> Cor >>>>> >>>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >>>>> news:1151564031.37565@athnrd02... >>>>>> Hi, >>>>>> >>>>>> I have spent the last two days trying to write a class which will act >>>>>> as a database table. I will be able to add, delete and update >>>>>> records. Does anyone have a sample of this kind of data management? >>>>>> >>>>>> Aristotelis >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > As I previously said I believe that this is because you save only the data,
not the table schema. Use the second parameter of the WriteXml method to explicitely tells to save the schema. (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatasetclasswritexmltopic6.asp for details). Hope this helps. -- Patrice "Aristotelis Pitaridis" <pitari***@hotmail.com> a écrit dans le message de news: 1151578335.882625@athnrd02...Show quoteHide quote >I do not delete the table. I delete the rows. The table disapears >automatically when there are not records in the table. > > Aristotelis > > Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá > news:OndI3g2mGHA.1852@TK2MSFTNGP03.phx.gbl... >> >> Aristotelis, >> >> That is normal, if you delete the table than it is not anymore after >> that. Therefore can you replie this in other words, >> >> Cor >> >> "Aristotelis Pitaridis" <pitari***@hotmail.com> schreef in bericht >> news:1151575327.145808@athnrd02... >>> The table will be destroyed when I delete all the data, save the dataset >>> and close the application. The next time that I will try to read data >>> from the XML file, the table will not be there. >>> >>> Ï "Patrice" <scr***@chez.com> Ýãñáøå óôï ìÞíõìá >>> news:Olc3Vu1mGHA.1852@TK2MSFTNGP03.phx.gbl... >>>> >>>> Datasets should keep changes and won't destroy the table if you destroy >>>> all rows. I would suggest first to post about how to solve these >>>> particular problems problems before trying to create your own >>>> replacement (my first guess would be that you don't save the schema but >>>> just the data, not sure what it could be for the first point)... >>>> >>>> -- >>>> Patrice >>>> >>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message >>>> de news: 1151570269.871751@athnrd02... >>>>>I want to keep the data in memory. When the application will finish I >>>>>will call the appropriate member function in order to save the data. I >>>>>know that this type of data management will be single user application >>>>>but it works fine for my project. >>>>> >>>>> My primary problem is that it does not save the last values that I >>>>> added in the DataSet. >>>>> >>>>> An other problem is that if I delete all the records, the table >>>>> disappears. >>>>> >>>>> If I had a proper example of XML table management, I would change it >>>>> in order to work with my problem. >>>>> >>>>> Aristotelis >>>>> >>>>> Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá >>>>> news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >>>>>> >>>>>> Pitardidis, >>>>>> >>>>>> What you have in mind? >>>>>> >>>>>> Do you want to do that on disk, than you cannot do that with an XML, >>>>>> do you want that in memory, you can simply use the DataSet. But than >>>>>> read and write the complete everytime the Dataset and therefore you >>>>>> can only use this for Single User applications. >>>>>> >>>>>> I hope this gives an idea, >>>>>> >>>>>> Cor >>>>>> >>>>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >>>>>> news:1151564031.37565@athnrd02... >>>>>>> Hi, >>>>>>> >>>>>>> I have spent the last two days trying to write a class which will >>>>>>> act as a database table. I will be able to add, delete and update >>>>>>> records. Does anyone have a sample of this kind of data management? >>>>>>> >>>>>>> Aristotelis >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Can you show us some code that you use to write the dataset. As Patrice
wrote already you probably don't write the scheme Cor "Aristotelis Pitaridis" <pitari***@hotmail.com> schreef in bericht news:1151578335.882625@athnrd02...Show quoteHide quote >I do not delete the table. I delete the rows. The table disapears >automatically when there are not records in the table. > > Aristotelis > > Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá > news:OndI3g2mGHA.1852@TK2MSFTNGP03.phx.gbl... >> >> Aristotelis, >> >> That is normal, if you delete the table than it is not anymore after >> that. Therefore can you replie this in other words, >> >> Cor >> >> "Aristotelis Pitaridis" <pitari***@hotmail.com> schreef in bericht >> news:1151575327.145808@athnrd02... >>> The table will be destroyed when I delete all the data, save the dataset >>> and close the application. The next time that I will try to read data >>> from the XML file, the table will not be there. >>> >>> Ï "Patrice" <scr***@chez.com> Ýãñáøå óôï ìÞíõìá >>> news:Olc3Vu1mGHA.1852@TK2MSFTNGP03.phx.gbl... >>>> >>>> Datasets should keep changes and won't destroy the table if you destroy >>>> all rows. I would suggest first to post about how to solve these >>>> particular problems problems before trying to create your own >>>> replacement (my first guess would be that you don't save the schema but >>>> just the data, not sure what it could be for the first point)... >>>> >>>> -- >>>> Patrice >>>> >>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> a écrit dans le message >>>> de news: 1151570269.871751@athnrd02... >>>>>I want to keep the data in memory. When the application will finish I >>>>>will call the appropriate member function in order to save the data. I >>>>>know that this type of data management will be single user application >>>>>but it works fine for my project. >>>>> >>>>> My primary problem is that it does not save the last values that I >>>>> added in the DataSet. >>>>> >>>>> An other problem is that if I delete all the records, the table >>>>> disappears. >>>>> >>>>> If I had a proper example of XML table management, I would change it >>>>> in order to work with my problem. >>>>> >>>>> Aristotelis >>>>> >>>>> Ï "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> Ýãñáøå óôï ìÞíõìá >>>>> news:ewaH6E1mGHA.2252@TK2MSFTNGP04.phx.gbl... >>>>>> >>>>>> Pitardidis, >>>>>> >>>>>> What you have in mind? >>>>>> >>>>>> Do you want to do that on disk, than you cannot do that with an XML, >>>>>> do you want that in memory, you can simply use the DataSet. But than >>>>>> read and write the complete everytime the Dataset and therefore you >>>>>> can only use this for Single User applications. >>>>>> >>>>>> I hope this gives an idea, >>>>>> >>>>>> Cor >>>>>> >>>>>> "Pitaridis Aristotelis" <pitari***@hotmail.com> schreef in bericht >>>>>> news:1151564031.37565@athnrd02... >>>>>>> Hi, >>>>>>> >>>>>>> I have spent the last two days trying to write a class which will >>>>>>> act as a database table. I will be able to add, delete and update >>>>>>> records. Does anyone have a sample of this kind of data management? >>>>>>> >>>>>>> Aristotelis >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > |
|||||||||||||||||||||||