N
NachoShaw
Guest
Hi
A quick general question. I have a datasource component on my form that was generated when i used a wizard to create a datasource to a control grid. That component is called SQLDatasource1
i can assign this to a grid by using
Grid1.Datasource = SQLDatasource1.Fill()
Is there a method that i can use to iterate / loop through the dataset without needing to assign it to a control? I am trying to populate a textbox with the value of a data return as the return data is a single row. I can do it using a BLL DAL class by iterating through the List(of) and using a For Each like this
Private ed_bll As MY.BLL.GetProjectList = New MY.BLL.GetProjectList
Private ProjRets As List(Of MY.BLL.GetProjectList_details) = ed_bll.SelectGetProjectList("")
For Each ret As MY.BLL.GetProjectList_details In ProjRets
Dim GetName As String = ret._name
TxtName.Text = GetName
Exit For
Next
The BLL DAL classes take time to set up and i have a lot to do. Using the component reduces my code time right down to a few lines..
I'd like to do something similar if possible with a Datasource component. Is this possible?
Thanks
I am here to ask questions and learn from others. Cor Ligthert DO NOT REPLY TO ANY OF MY POSTS!!
Continue reading...
A quick general question. I have a datasource component on my form that was generated when i used a wizard to create a datasource to a control grid. That component is called SQLDatasource1
i can assign this to a grid by using
Grid1.Datasource = SQLDatasource1.Fill()
Is there a method that i can use to iterate / loop through the dataset without needing to assign it to a control? I am trying to populate a textbox with the value of a data return as the return data is a single row. I can do it using a BLL DAL class by iterating through the List(of) and using a For Each like this
Private ed_bll As MY.BLL.GetProjectList = New MY.BLL.GetProjectList
Private ProjRets As List(Of MY.BLL.GetProjectList_details) = ed_bll.SelectGetProjectList("")
For Each ret As MY.BLL.GetProjectList_details In ProjRets
Dim GetName As String = ret._name
TxtName.Text = GetName
Exit For
Next
The BLL DAL classes take time to set up and i have a lot to do. Using the component reduces my code time right down to a few lines..
I'd like to do something similar if possible with a Datasource component. Is this possible?
Thanks
I am here to ask questions and learn from others. Cor Ligthert DO NOT REPLY TO ANY OF MY POSTS!!
Continue reading...