|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
know if a datatable is being schemafilles but not ever fillesHi all,
in my program I initialize a lot of datatable (member of the same dataset) with the .FillSchema method of the adapter at the startup. After when a user trough the guy requests a such data, I populate the datatable with the .Fill method. If I have a such datatable (I'me sure it have been schemafilled) can I know if that table is have been filles with .Fill method? If the table has 0 rows is it because the sql table has 0 rows or because it hasn't been filled? Perhaps you can add a row that has known place-holder values post
SchemaFill. Before Fill, clear the table and test for the place-holder to see if "real" data was loaded. Why pre-populate with schema? -- Show quote____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ Visit www.hitchhikerguides.net to get more information on my latest book: Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition) and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ----------------------------------------------------------------------------------------------------------------------- "Andrea Caldarone" <software-livqu***@3techsrl.com> wrote in message news:Ox3aCflNHHA.4928@TK2MSFTNGP06.phx.gbl... > Hi all, > > in my program I initialize a lot of datatable (member of the same dataset) > with the .FillSchema method of the adapter at the startup. After when a > user trough the guy requests a such data, I populate the datatable with > the .Fill method. > If I have a such datatable (I'me sure it have been schemafilled) can I > know if that table is have been filles with .Fill method? If the table has > 0 rows is it because the sql table has 0 rows or because it hasn't been > filled? > William (Bill) Vaughn wrote:
> Perhaps you can add a row that has known place-holder values post I load the database's schema into my dataset this task requires few time, > SchemaFill. Before Fill, clear the table and test for the > place-holder to see if "real" data was loaded. Why pre-populate with > schema? after that I can create (I automatically do this with a class of my own) all the foreign key relationship, customize the datatables and pass them to the controls of my application. When I really know that some data have to be shown to the end user, I populate the datatables involved with the fill command. But before invoke the .Fill method it is useful to konw if the datatable has ever been filled: datatable with 0 record -> is it an empty one or it has never been filled? datatable with more than 1 records -> sure, it has just been filled, no other .Fill is required Show quote > > > "Andrea Caldarone" <software-livqu***@3techsrl.com> wrote in message > news:Ox3aCflNHHA.4928@TK2MSFTNGP06.phx.gbl... >> Hi all, >> >> in my program I initialize a lot of datatable (member of the same >> dataset) with the .FillSchema method of the adapter at the startup. >> After when a user trough the guy requests a such data, I populate >> the datatable with the .Fill method. >> If I have a such datatable (I'me sure it have been schemafilled) can >> I know if that table is have been filles with .Fill method? If the >> table has 0 rows is it because the sql table has 0 rows or because >> it hasn't been filled? Andrea,
The fill does filling the schema as well. Not complete but for that is as well an command. "missing schema etc). Cor Show quote "Andrea Caldarone" <software-livqu***@3techsrl.com> schreef in bericht news:Ox3aCflNHHA.4928@TK2MSFTNGP06.phx.gbl... > Hi all, > > in my program I initialize a lot of datatable (member of the same dataset) > with the .FillSchema method of the adapter at the startup. After when a > user trough the guy requests a such data, I populate the datatable with > the .Fill method. > If I have a such datatable (I'me sure it have been schemafilled) can I > know if that table is have been filles with .Fill method? If the table has > 0 rows is it because the sql table has 0 rows or because it hasn't been > filled? > |
|||||||||||||||||||||||