Answered by:
The problem with DataSet

Question
-
Hallo
I have manually added DataSet through Add/New item to my project(ASP.NET). I cant login to DataSet in sorce code. I can connect GridView to DataSet through ObjectDataSource with no problem. Is there any dfference in creating DataSet manually in project through Add/New item and DataSet created in source code when program is running? If i create it in source code everithing is running ok but i cant connect to it, when i add it to project through Add/New item. I need directly select data from this DataSet.
ASP.NET, VB.NET, VS 2013
Thank you for your answer.
- Moved by Fred Bao Friday, January 16, 2015 9:39 AM ASP.NET Related
Sunday, January 4, 2015 9:38 PM
Answers
-
Vladimir,
A dataset is a kind of snapshot from a database. It is about relations and tables.
For sure you cannot use something like a string to set it.
I don't know your current knowledge but because of the fact all your problems are around the user interface ASP.Net, you are probably better of asking your question in the forum.
http://forums.asp.net/54.aspx/1?DataSource+Controls+SqlDataSource+ObjectDataSource+etc
Success
Cor- Edited by Cor Ligthert Monday, January 5, 2015 2:04 PM
- Proposed as answer by Fred Bao Friday, January 16, 2015 9:40 AM
- Marked as answer by Just Karl Friday, April 17, 2015 8:06 PM
Sunday, January 4, 2015 11:20 PM
All replies
-
Hello Vladimir,
Looking at your description your problem is difficult to answer. Why, simply because there are thousand ways which what you describe can be done.
However, one of the thing which is really strange is that yo write you try to login to a DataSet. There is nothing to login to a dataset.
A Dataset is just a class which can be used to instance an object to keep references to data around relations and tables.
You can set that DataSet (object) to a GridView, where it is not important if it is in source of running program. All code in whatever way you made it is only executed at runtime.
Therefore, show us more information how you did this.
Success
CorSunday, January 4, 2015 9:52 PM -
Thank you for your answer. I have DataSet above table and i need choose data form this table. Can i use following procedure? I give ObjectDataSource to ASP, that i connect to DataSet. Can i create GridView in FormLoad and then Connect GridView to ObjectDataSource?.
From GridView I would then take the data.
Dim dgv as new GridView dgv.DataSourceId = „ObjectDataSource“
Am i going right way? I need to take data from table to source code through DataSet.
Sunday, January 4, 2015 10:49 PM -
Vladimir,
A dataset is a kind of snapshot from a database. It is about relations and tables.
For sure you cannot use something like a string to set it.
I don't know your current knowledge but because of the fact all your problems are around the user interface ASP.Net, you are probably better of asking your question in the forum.
http://forums.asp.net/54.aspx/1?DataSource+Controls+SqlDataSource+ObjectDataSource+etc
Success
Cor- Edited by Cor Ligthert Monday, January 5, 2015 2:04 PM
- Proposed as answer by Fred Bao Friday, January 16, 2015 9:40 AM
- Marked as answer by Just Karl Friday, April 17, 2015 8:06 PM
Sunday, January 4, 2015 11:20 PM -
I fixed your link, Cor:
http://forums.asp.net/54.aspx/1?DataSource+Controls+SqlDataSource+ObjectDataSource+etc
~~Bonnie DeWitt [C# MVP]
Monday, January 5, 2015 12:01 AM -
thank youMonday, January 5, 2015 8:52 AM
-
I fixed your link, Cor:
http://forums.asp.net/54.aspx/1?DataSource+Controls+SqlDataSource+ObjectDataSource+etc
~~Bonnie DeWitt [C# MVP]
Thank you Bonnie, I did it again.
Success
CorMonday, January 5, 2015 2:04 PM