Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by Priyanka7777 (Top 36 by date)
This gives me an error that the "Resource cannot be found".
Great this works.But the problem is i need to save some information on OK button click.
I want to write this code:
cmd = objDb.GetStoredProcCommand("SetSurveyInfoDetails");
//temporary set dropdown value to xyz.to run the SP.
Session["DropDownListSurvey"] = "XYZ";
objDb.AddInParameter(cmd, "@ServeyName ", DbType.String, Session["DropDownListSurvey"]);
objDb.AddInParameter(cmd, "@Name ", DbType.String, txtName.Text);
objDb.AddInParameter(cmd, "@Mobile ", DbType.String, txtMobile.Text);
objDb.AddInParameter(cmd, "@Email_Id ", DbType.String, txtEmail.Text);
result = objDb.ExecuteNonQuery(cmd);
Is it possible?
I am not getting any error.Nut the confirmation box is not shown.
Yes.I want to save the information entered once the user clicks on OK button.
Sorry i added your code,but it is not working.Confirmation box is not opening.
I did in the design but still i am not able to change it.
I know i have reposted the answer,but the only purpose was to make things simpler for 12345_abcde.
I did not get the purpose of 2nd table(paperlist),but still i have written a query for
your first table(SEGDATA) to get conflicting records.See if it helps you.
(SELECT (':' + MODULECODE)
FROM SEGDATA1 S2
FOR XML PATH( '' ) ),3,1000) AS CONFLICTING_PAPERS
FROM SEGDATA1 S1
GROUP BY ADMINNO
Post the table structure along with data and let me know what are the common columns for both the tables.
Were you able to solve your problem?
You want to search for common students within exampapers,right?
You can do that using inner join.
What is the problem that you are facing?
Join the two tables 'paperslist' and 'ModuleStudents' with the help of inner join.
Try defining the parameters outside and before the for loop.
Why are you comparing the values in the datasets,instead you can join the two tables in the SQL query.
textBox2.Text = new DateTime(precti.GetOrdinal("odjezd").Ticks).ToString("HH:mm:ss");
Please be more specific!!!
This is the only field that you have added in your query:
rule1.fnlwgt = probablity.fnlwgt.
Check for similar links that you can make between rule1 table and probablity.
what chimcham said is right.There is still another field that you have to link for you to get the distinct data.Check for more linking between the two tables.
Check out this link which shows how to Retrieve Values of Cached Items.
Which solution did work for you?
Please mark the solution as answer which worked for you.
Actually it should work.
Check this link if you find something useful.
What are the namespaces that you have added in your code?
Add after this line:
FullsortDataGridView.DataSource = ds.Tables(0)
Have you missed this line in your code or not added it?
Glad that it helped you... :)
You can now bind the result that you got in 'distinctTable' to your gridview's DataSource event.
This was just a sample code to let you know how you get distinct records.
As per your code provided above you can change it to:
da = new SqlDataAdapter("select DISTINCT Date,Humidity,Temprature,light,Voltage,outp from Dataset", cn.con);
dt = new DataTable();
//dt will contain the data from your query.
DataTable distinctTable = dt.DefaultView.ToTable( /*distinct*/ true);
See if it works.
The solution does work.I have checked it.
Try this piece of code and check what result you get in 'distinctTable' DatatTable:
DataTable table2 = new DataTable("articletable");
DataRow row2 = table2.NewRow();
row2 = "1";
row2 = "article name";
row2 = "article contents go here";
DataRow row1 = table2.NewRow();
row1 = "1";
row1 = "article name";
row1 = "article contents go here";
DataTable distinctTable = table2.DefaultView.ToTable( /*distinct*/ true);
Instead of using a DataTable dt in this line use a DataView
DataView dv= dt(/*default*/true).DefaultView;
Correct this line to :
DataView dv1 = new DataView();
DataView dv= dv1.ToTable(/*default*/true).DefaultView;
What do you mean by Next Previous Functionality without Repeated hits on DataBase.
Can u be a little brief?
Im glad that it helped you!!!
Put a break point for second buttons click event.Does the control go there?
Did this solution work for you?
Mark as answer if it worked for you.....
Last Updated 1 Jan 1900
All Rights Reserved.