Hi
Im try to get my head round datasets being typed and untyped and had a query. Am i write in saying that a typed dataset has to have a schema which comes .xsd file. An untyped dataset does not have a schema and just contains tables, row and columns.
So im just wondering how do I create a strongly typed dataset programmatically, i dont know how to create a .xsd file, however I notice I can write the dataset out to an xml file (does this make it strongly typed). I notice that Visual Studio creates the .xsd file for you easily enough but im trying to stay away from the GUI side of things and doing it all by hand code first.
So for example how would i make the below example typed? And do I need to make sure every dataset I create is typed.
Dim dsDetails As New DataSet()
Dim Conn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("connBSS")
Dim objAdapter As SqlDataAdapter = New SqlDataAdapter("SELECT SvpsName, SvpsID FROM Services", Conn)
objAdapter.Fill(dsDetails, "Details"
'Then i show the value
lblSvpsName.Text = dsDetails.Tables("Details".Rows(0).Item("SvpsName"
lblSvpsID.Text = dsDetails.Tables("Details".Rows(0).Item("SvpsID"
Thanks in advance
Im try to get my head round datasets being typed and untyped and had a query. Am i write in saying that a typed dataset has to have a schema which comes .xsd file. An untyped dataset does not have a schema and just contains tables, row and columns.
So im just wondering how do I create a strongly typed dataset programmatically, i dont know how to create a .xsd file, however I notice I can write the dataset out to an xml file (does this make it strongly typed). I notice that Visual Studio creates the .xsd file for you easily enough but im trying to stay away from the GUI side of things and doing it all by hand code first.
So for example how would i make the below example typed? And do I need to make sure every dataset I create is typed.
Dim dsDetails As New DataSet()
Dim Conn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("connBSS")
Dim objAdapter As SqlDataAdapter = New SqlDataAdapter("SELECT SvpsName, SvpsID FROM Services", Conn)
objAdapter.Fill(dsDetails, "Details"
'Then i show the value
lblSvpsName.Text = dsDetails.Tables("Details".Rows(0).Item("SvpsName"
lblSvpsID.Text = dsDetails.Tables("Details".Rows(0).Item("SvpsID"
Thanks in advance