[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.inetserver.asp.db

michael kors outlet uq111

Katadedajab

12/26/2013 7:14:00 PM

<a href=http://www.holzrichterlaw.com/modern-mk.html><b&... kors outlet</b></a>There has to be that a multi functional excellent reputation everywhere over the going to be the available on the web store now.100% customer satisfaction and cost free shipping.Welcome for more information about make for the money here at all of our outlet in the store online best information and then for me.<a href=http://www.michaelhardeman.com/mkoutlet5.html><b&... kors outlet</b></a>Thank all your family ach much as well as for this just i always searched many site as well as for this and which i now that you have a resource box in your your site.Thank all your family members now that you've got again.<a href=http://www.johnhalbrookpsychotherapy.com/latest.html><b&... kors outlet</b></a>One technical question ? I don¡¯t think my very own comment replies be able to get sent by mail automatically to understand more about going to be the person I¡¯m replying to explore What¡¯s going to be the right way to learn more about be capable of getting that for additional details on have the desired effect I what better way like I¡¯m missing something really obvious.<a href=http://www.woodheadpublishing.com/mk-store.html><b&... kors outlet</b></a>
1 Answer

Manish Bafna

8/22/2007 1:42:00 AM

0

Hi,
I think i have gone little bit off the topic.You can use use in-built
GetSchema method of DataTable,Dataset or connection in your custom
compareschema method.Google for Getschema and you will get further insights
on how you can use in your compareschema method.It can be as simple as
something like this:
If dataset1.GetSchema().Equals(dataset2.Getschema()
{
messagebox.show("Schema are equal");
}
else
{
messagebox.show("Schema are not equal");
}
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"David" wrote:

> Thanks, although I was kind of hoping for a "compareschema" function. It
> would seem useful. I wonder why it doesn't exist.
>
> I think that, instead, what I really need is to see if the two datasets have
> the same number of tables and same columns. So, I think I'll write a utility
> that compares the columnames in each table.
>
> "Manish Bafna" wrote:
>
> > Hi,
> > you can try something like this in below sample code:
> > private void Form1_Load(object sender, EventArgs e)
> > {
> >
> > DataTable dt = new DataTable();
> > DataColumn col1 = new DataColumn();
> > DataColumn col2 = new DataColumn();
> > col1.ColumnName = "Name";
> > col2.ColumnName = "PostingTime";
> >
> > col1.DataType = typeof(System.String);
> > col2.DataType = typeof(System.DateTime);
> > dt.Columns.Add(col1);
> > dt.Columns.Add(col2);
> >
> > DataRow row1 = dt.NewRow();
> > row1["Name"] = "Manish Bafna";
> > row1["PostingTime"] = DateTime.Now;
> >
> > DataRow row2 = dt.NewRow();
> > row2["Name"] = "Sanjay Bafna";
> > row2["PostingTime"] = DateTime.Now.AddHours(5);
> >
> > dt.Rows.Add(row1);
> > dt.Rows.Add(row2);
> >
> > dt.AcceptChanges();
> >
> > DataSet ds = new DataSet();
> > ds.Tables.Add(dt);
> >
> > ds.WriteXml("XMLFile1.xml", XmlWriteMode.IgnoreSchema);
> >
> > dataGridView1.DataSource = dt;
> >
> > DataColumn col3 = new DataColumn();
> > col3.ColumnName = "NewColumn";
> > col3.DataType = typeof(System.String);
> > col3.DefaultValue = "Hello";
> > ds.Tables[0].Columns.Add(col3);
> > DataRow row3 = ds.Tables[0].NewRow();
> >
> > row3["Name"] = "Janak NAIK";
> > row3["PostingTime"] = DateTime.Now.AddYears(2);
> > row3["NewColumn"] = "Welcome";
> > ds.Tables[0].Rows.Add(row3);
> >
> > ds.AcceptChanges();
> >
> > DataSet ds2 = new DataSet();
> >
> > ds2.ReadXml("XMLFile1.xml", XmlReadMode.IgnoreSchema);
> >
> > ds.Merge(ds2, true, MissingSchemaAction.Ignore);
> >
> > dataGridView2.DataSource = ds.Tables[0];
> > }
> >
> > --
> > Hope this helps.
> > Thanks and Regards.
> > Manish Bafna.
> > MCP and MCTS.
> >
> >
> >
> > "David" wrote:
> >
> > > I have an application that saves a bunch of data in XML files that come from
> > > typed datasets.
> > >
> > > So, I have something like this:
> > >
> > > MyTypedDs myds;
> > >
> > > //.... When the user wants to save the data
> > >
> > > myds.WriteXML(thefilename,XMLWriteMode.WriteSchema);
> > >
> > > Later on, when he wants to open a saved file,
> > >
> > > myds=new (MyTypedDs);
> > > myds.ReadXML(thefilename,XMLReadMode.ReadSchema);
> > >
> > >
> > >
> > > Great. So far, so good.
> > >
> > > Now, some fields have been added to the records. The tables in the dataset
> > > have some additional columns. I want to be able to open up the old files
> > > that have been previously saved, and if the file is from the old format,
> > > convert it to the new format, filling in default values for missing fields.
> > >
> > > TypedDSV1 myversion1ds;
> > > TypedDSV2 myversion2ds;
> > >
> > > DataSet myds;
> > >
> > > //When opening a file.
> > >
> > > myds.ReadXML(thefilename,XMLReadMode.ReadSchema)
> > > if (the schema from the file matches version1)
> > > {myversion1ds=(TypedDSV1)myds;
> > > Convertv1tov2(myversion1ds,myversion2ds);
> > > }
> > > else if (the schema from the file matches version 2)
> > > {
> > > myversion2ds=(TypedDSV2)myds;
> > > }
> > > else return retvals.Schemadoesntmatch;
> > >
> > > So, is there a very easy way to write the (the schema from the file matches
> > > version 2) function?