15,904,877 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 9772922 (Top 7 by date)
Member 9772922
19-Feb-13 14:11pm
View
i am storing the retrieved customerid(1,2) into an array which inside a while loop and later when i try to retrieve the values from the array it is showing wrong values(2 and 0)
I am not able to understand what is happening?
and here is the code
string cust = "select distinct(customerid) from customerpaper";
SqlCommand custcmd = new SqlCommand(cust, con);
sda = custcmd.ExecuteReader();
if (sda.HasRows)
{
while (sda.Read())
{
i = 0;
customerid[i] = Convert.ToInt32(sda.GetValue(0).ToString());
listBox1.Items.Add(customerid[i]); //customerid 1 and 2 is stored
custid = customerid[i];
//textBox1.Text = custid.ToString();
// absent1(custid, customercoun);
// listBox1.Items.Add(customerid[i]);
i = i + 1;
}
}
sda.Close();
for (int j = 0; j < 10;j++ )
{
listBox2.Items.Add(customerid[j]);//customerid 2 and 0 is being retrieved
}
Member 9772922
29-Jan-13 8:07am
View
By the way i am using vs2010 and sql server r2 2008
Member 9772922
29-Jan-13 7:59am
View
In customer interface i have a combobox from where the user selects the paper for a particular customer.Now how i will retrieve the paperid from the selected paper.I also have a listbox next to combobox to show the selected paper plz help me out.
Member 9772922
28-Jan-13 1:00am
View
Im facing another problem as you said to create a third table with id,custid and paperid,how to retrieve the custid from the customer table in the third table
Member 9772922
27-Jan-13 9:14am
View
I have another table for paper where i have paperid,papername and the dealer id with whom i buy from.The idea behind to think this was that by doing this i thought of reducing the number of rows for eg:if all the client take 3 paper suppose and there are 1000 customers then it will take 3000 rows so i thought of just reducing it
Member 9772922
27-Jan-13 1:27am
View
This solution is good but i thought of doing it but i dont know whether it is really good the thing is instead of creating a seperate i.e. third table with custid and paperid why cant we make the names of the paper as columns(
datatype bit ) and the columns will be set to 0 or 1 depending upon the paper selected by the customer
Member 9772922
26-Jan-13 3:28am
View
okk
Show More