Hi, I am creating vb.net application in which I have some problem with comparing values in dataset with some textbox entry/system day like(thursday,friday....) and according to result of that comparison I should perform some other task. but the problem arises in comparison. my dataset is having only one column(which is not a primary key & not a reference key to any table) and n numbar of rows in it. when I try to compare value of some textbox with all the rows in dataset,it gives me error table does not contain primary key.So,I can't access(can't compare) values which are inside dataset.
The problem is comparing value of dataset which column is not a primary key
In tried some code like
objdataadpter as sqlsdataadapter("query"con) objdataset=new dataset objdataadapter.fill(objdataset,"table_name"
2)tried objdataset.tables("table_name".rows(0).find(ctype(textbox1.text,object)).is null("doc_day" then do some task
I have also tried using datareader class
Waiting for result
bye from me
Hi, I am creating vb.net application in which I have some problem with comparing values in dataset with some textbox entry/system day like(thursday,friday....) and according to result of that comparison I should perform some other task. but the problem arises in comparison. my dataset is having only one column(which is not a primary key & not a reference key to any table) and n numbar of rows in it. when I try to compare value of some textbox with all the rows in dataset,it gives me error table does not contain primary key.So,I can't access(can't compare) values which are inside dataset.
The problem is comparing value of dataset which column is not a primary key
In tried some code like
objdataadpter as sqlsdataadapter("query"con) objdataset=new dataset objdataadapter.fill(objdataset,"table_name"
Joined: 09 Aug 2005 Country: Netherlands Posts: 24
Posted: 14 Nov 2005 09:38:10
I presume you want to compare textually, as you want to compare with a textbox. You could explicitly cast the data in the dataset to a String object, and then compare it with the "equals" function to the text property of the textbox. If you do want to know whether the value is part of the string, then have a look at the indexof functions, which can take strings as well.
I've provided the function names by head, so it might not be completely accurate <img src=../images/dnzone/forum/icon_smile_wink.gif border=0 align=middle>
Cheers,
Mark
-- DNZone.com
I presume you want to compare textually, as you want to compare with a textbox. You could explicitly cast the data in the dataset to a String object, and then compare it with the "equals" function to the text property of the textbox. If you do want to know whether the value is part of the string, then have a look at the indexof functions, which can take strings as well.
I've provided the function names by head, so it might not be completely accurate <img src=../images/dnzone/forum/icon_smile_wink.gif border=0 align=middle>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Hi, I am creating vb.net application in which I have some problem with comparing values in dataset with some textbox entry/system day like(thursday,friday....) and according to result of that comparison I should perform some other task. but the problem arises in comparison. my dataset is having only one column(which is not a primary key & not a reference key to any table) and n numbar of rows in it. when I try to compare value of some textbox with all the rows in dataset,it gives me error table does not contain primary key.So,I can't access(can't compare) values which are inside dataset.
The problem is comparing value of dataset which column is not a primary key
In tried some code like
objdataadpter as sqlsdataadapter("query"con) objdataset=new dataset objdataadapter.fill(objdataset,"table_name"
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Hi, I am creating vb.net application in which I have some problem with comparing values in dataset with some textbox entry/system day like(thursday,friday....) and according to result of that comparison I should perform some other task. but the problem arises in comparison. my dataset is having only one column(which is not a primary key & not a reference key to any table) and n numbar of rows in it. when I try to compare value of some textbox with all the rows in dataset,it gives me error table does not contain primary key.So,I can't access(can't compare) values which are inside dataset.
The problem is comparing value of dataset which column is not a primary key
In tried some code like
objdataadpter as sqlsdataadapter("query"con) objdataset=new dataset objdataadapter.fill(objdataset,"table_name"
When a graph is drawn, the focus is kept on the actual underlying competing figures that constitute the graph. Sometimes it is difficult to make assumptions just by looking at these graphs. When looking at a geographical map of data you immediately see exactly where things are happening. This article presents a .NET geographical mapping solution that will illustrate a fairly simple way of implementing these maps.
Have you, as a web developer or designer ever been on sites where the site seems more of a puzzle then a tool to find the information you where looking for? Or are you looking to improve your web design skills? Then read on!
Design & Accessibility
This e-Book will teach you how to become a truly professional developer or designer. By taking usability and accessibility issues in account when designing your websites or applications you can make the difference and avoid a lot of (user) frustration.
Inside ASP.NET is a comprehensive guide to ASP.NET development using Microsoft's .NET development framework. This book presents information on the .NET framework that is of specific interest to Internet and intranet developers, and is split into the following sections: Introducing ASP.NET, Core ASP.NET, ASP.NET and Data Access, Advanced Technologies, Advanced Web Forms, and Putting It All Together
Each chapter tackles a specific area of ASP.NET development, first by giving a detailed overview, then presenting a series of code examples and walk-throughs that illustrate various applications of ASP.NET