473,394 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Need help designing XML Dataset

Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the XML
designer.

I want to be able to have a table for each trip. The trip will contain a
trip no, date etc. But i also want it to have a State element like "PA, NJ,
MD" for each state with miles traveled for each state. I don't want to
enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without doing
each state individually ? How would i reference the table/array in code ?

Any help would be gratefully appreciated.

Thanks,
Tony
Sep 16 '06 #1
6 1288
Create a table with the states in it. Add a reference in your other table.
Add both tables to the same dataset. Add a relationship between the tables
in the DataSet. You can now refer to the parent (state) records from the
other table.

If you then want to query a single state, you can filter on the records that
are linked to the state in question.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:uP**************@TK2MSFTNGP04.phx.gbl...
Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the XML
designer.

I want to be able to have a table for each trip. The trip will contain a
trip no, date etc. But i also want it to have a State element like "PA,
NJ, MD" for each state with miles traveled for each state. I don't want
to enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without
doing each state individually ? How would i reference the table/array in
code ?

Any help would be gratefully appreciated.

Thanks,
Tony

Sep 16 '06 #2
Hello Cowboy.

Thanks for your help with this.

I don't see how what you are saying help's me. Here is what i have:
Trip DataTable
Tripno
Tractorno
Location
Date
Mileage in state (can occur as many as 50 times, one for each state or
can be just 1 state)
Fuel in state (can occur as many as 50 times, one for each state or can
be just 1 state)
Tolls

So, instead of adding fifty elements state(twice, 1 for mileage and 1 for
fuel), i want to just say it once and use some kind of index to loop thru
the states for each trip.

There will always be at least 1 state for each trip.

I hope that makes sense. I don't know how to do that with the xml designer.
I also don't know how to put it in code to access the individual columns for
each trip.

Thanks
Tony

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:Os**************@TK2MSFTNGP02.phx.gbl...
Create a table with the states in it. Add a reference in your other table.
Add both tables to the same dataset. Add a relationship between the tables
in the DataSet. You can now refer to the parent (state) records from the
other table.

If you then want to query a single state, you can filter on the records
that are linked to the state in question.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:uP**************@TK2MSFTNGP04.phx.gbl...
>Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the
XML designer.

I want to be able to have a table for each trip. The trip will contain a
trip no, date etc. But i also want it to have a State element like "PA,
NJ, MD" for each state with miles traveled for each state. I don't want
to enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without
doing each state individually ? How would i reference the table/array in
code ?

Any help would be gratefully appreciated.

Thanks,
Tony


Sep 17 '06 #3
What about adding an element that occurs from 1..n that has an attribute of
the state code? A sample XML would be:

<Trip>
<Miles state="OH">75</Miles>
<Miles state="KY">300</Miles>
<Miles state="TN">100</Miles>
</Trip>
Regards,

Max

"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hello Cowboy.

Thanks for your help with this.

I don't see how what you are saying help's me. Here is what i have:
Trip DataTable
Tripno
Tractorno
Location
Date
Mileage in state (can occur as many as 50 times, one for each state or
can be just 1 state)
Fuel in state (can occur as many as 50 times, one for each state or can
be just 1 state)
Tolls

So, instead of adding fifty elements state(twice, 1 for mileage and 1 for
fuel), i want to just say it once and use some kind of index to loop thru
the states for each trip.

There will always be at least 1 state for each trip.

I hope that makes sense. I don't know how to do that with the xml
designer. I also don't know how to put it in code to access the individual
columns for each trip.

Thanks
Tony

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:Os**************@TK2MSFTNGP02.phx.gbl...
>Create a table with the states in it. Add a reference in your other
table. Add both tables to the same dataset. Add a relationship between
the tables in the DataSet. You can now refer to the parent (state)
records from the other table.

If you then want to query a single state, you can filter on the records
that are linked to the state in question.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************** **
Think outside of the box!
*********************************************** **
"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:uP**************@TK2MSFTNGP04.phx.gbl...
>>Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the
XML designer.

I want to be able to have a table for each trip. The trip will contain
a trip no, date etc. But i also want it to have a State element like
"PA, NJ, MD" for each state with miles traveled for each state. I don't
want to enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without
doing each state individually ? How would i reference the table/array
in code ?

Any help would be gratefully appreciated.

Thanks,
Tony



Sep 17 '06 #4
Hello Max.

It looks like you are creating XML data. I'm looking for how to define the
data with a schema.

Thanks,
Tony

"Max Schneider, Image Innovation" <ma*@imageinnova-takethisout.comwrote in
message news:z3*************@newsfe06.lga...
What about adding an element that occurs from 1..n that has an attribute
of the state code? A sample XML would be:

<Trip>
<Miles state="OH">75</Miles>
<Miles state="KY">300</Miles>
<Miles state="TN">100</Miles>
</Trip>
Regards,

Max

"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
>Hello Cowboy.

Thanks for your help with this.

I don't see how what you are saying help's me. Here is what i have:
Trip DataTable
Tripno
Tractorno
Location
Date
Mileage in state (can occur as many as 50 times, one for each state or
can be just 1 state)
Fuel in state (can occur as many as 50 times, one for each state or
can be just 1 state)
Tolls

So, instead of adding fifty elements state(twice, 1 for mileage and 1 for
fuel), i want to just say it once and use some kind of index to loop thru
the states for each trip.

There will always be at least 1 state for each trip.

I hope that makes sense. I don't know how to do that with the xml
designer. I also don't know how to put it in code to access the
individual columns for each trip.

Thanks
Tony

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:Os**************@TK2MSFTNGP02.phx.gbl...
>>Create a table with the states in it. Add a reference in your other
table. Add both tables to the same dataset. Add a relationship between
the tables in the DataSet. You can now refer to the parent (state)
records from the other table.

If you then want to query a single state, you can filter on the records
that are linked to the state in question.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************ *
Think outside of the box!
************************************************ *
"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:uP**************@TK2MSFTNGP04.phx.gbl...
Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the
XML designer.

I want to be able to have a table for each trip. The trip will contain
a trip no, date etc. But i also want it to have a State element like
"PA, NJ, MD" for each state with miles traveled for each state. I
don't want to enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without
doing each state individually ? How would i reference the table/array
in code ?

Any help would be gratefully appreciated.

Thanks,
Tony



Sep 17 '06 #5
I agree. Why not just add attribute state, and then enumerate the
value for each of the 50 states.
Max Schneider, Image Innovation wrote:
What about adding an element that occurs from 1..n that has an attribute of
the state code? A sample XML would be:

<Trip>
<Miles state="OH">75</Miles>
<Miles state="KY">300</Miles>
<Miles state="TN">100</Miles>
</Trip>
Regards,

Max

"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hello Cowboy.

Thanks for your help with this.

I don't see how what you are saying help's me. Here is what i have:
Trip DataTable
Tripno
Tractorno
Location
Date
Mileage in state (can occur as many as 50 times, one for each state or
can be just 1 state)
Fuel in state (can occur as many as 50 times, one for each state or can
be just 1 state)
Tolls

So, instead of adding fifty elements state(twice, 1 for mileage and 1 for
fuel), i want to just say it once and use some kind of index to loop thru
the states for each trip.

There will always be at least 1 state for each trip.

I hope that makes sense. I don't know how to do that with the xml
designer. I also don't know how to put it in code to access the individual
columns for each trip.

Thanks
Tony

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:Os**************@TK2MSFTNGP02.phx.gbl...
Create a table with the states in it. Add a reference in your other
table. Add both tables to the same dataset. Add a relationship between
the tables in the DataSet. You can now refer to the parent (state)
records from the other table.

If you then want to query a single state, you can filter on the records
that are linked to the state in question.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Tony Girgenti" <tony(nospam)@lakesideos.comwrote in message
news:uP**************@TK2MSFTNGP04.phx.gbl...
Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the
XML designer.

I want to be able to have a table for each trip. The trip will contain
a trip no, date etc. But i also want it to have a State element like
"PA, NJ, MD" for each state with miles traveled for each state. I don't
want to enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without
doing each state individually ? How would i reference the table/array
in code ?

Any help would be gratefully appreciated.

Thanks,
Tony
Sep 17 '06 #6
Tony:

I am not familiar with VS 2003. I started with .net 2.0 and VS 2005. The way
that I would handle this situation is as follows:

I would create two data tables:

1. TblTrips
2. TblTripDetails

TblTrips would have the following fields:

ID
TripNo
TractorNo

TblTripDetails would have the following fields:
ID
TripNo
Location
Date
MilesIn
FuelIn
Tolls

I am assuming that location is the state. If it is not, just replace
Location with state and insert State into TblTrips.

You can then establish a relationship in the designer. In code you can
create a datarow collection (array) and access all of the children based on
the trip id.

Hope this helps,
Daniel Brittain Dugger

TblTripDetails would have the following
"Tony Girgenti" wrote:
Hello

I developed and tested a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form.

I tried doing this without any help, but i'm getting nowhere.

I want to create an XML schema (XSD) for a dataset/datatable using the XML
designer.

I want to be able to have a table for each trip. The trip will contain a
trip no, date etc. But i also want it to have a State element like "PA, NJ,
MD" for each state with miles traveled for each state. I don't want to
enter 50 elements name MilesPA, MilesNJ, MilesMD etc.

Is there a way to define an array of states for the trip table without doing
each state individually ? How would i reference the table/array in code ?

Any help would be gratefully appreciated.

Thanks,
Tony
Sep 24 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
6
by: Chad A. Beckner | last post by:
Does anyone know how to make common database connections "common" in all aspx files? In other words, instead of creating a SQLConnection, then a DataAdapter in every ASPX file for my application,...
2
by: Sky Sigal | last post by:
Hello: I'm currently messing around, and need as much feedback/help as I can get, trying to find the most economical/graceful way to build usercontrols that rely on styling to look any good... ...
2
by: Richard | last post by:
Hi, I have 1 dataset with 2 tables (Table1 as parent, Table2 as Child), 1 row in both the tables. I am updating it with a transaction. First parent then child. When child update fails, it raise...
5
by: manmit.walia | last post by:
Hello All, I am stuck on a conversion problem. I am trying to convert my application which is written in VB.NET to C# because the project I am working on currently is being written in C#. I tried...
9
by: Tony Girgenti | last post by:
Hello I developed and tested a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form. I tried doing this without any help, but i'm...
7
by: jtbjurstrom | last post by:
Bear with me because we are new to WCF and have been going through documentation and samples trying to absorb as much as possible in a short amount of time. Any suggestions would be much...
2
by: faisalmushtaq | last post by:
Hi to all, I just wanna know from u guys that is there any requirement in designing of crystal report.what i mean to say is i am using crystal reports and i am giving dataset to my report,,Is...
9
by: pereges | last post by:
Hello I need some ideas for designing a recursive function for my ray tracing program. The idea behind ray tracing is to follow the electromagnetic rays from the source, as they hit the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.