16,021,294 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 .NET 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 jmpapa (Top 16 by date)
jmpapa
25-Feb-13 9:26am
View
finally, I made it! I used this code:
MySqlConnection sqlcon = new MySqlConnection(strConnString);
sqlcon.Open();
string sqlcmd = "select CONCAT(firstname, ' (' ,lastname,')') AS mixname from userdbase";
da = new MySqlDataAdapter(sqlcmd,sqlcon);
dt.Clear();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
ListBox1.DataSource = dt;
ListBox1.DataTextField = "mixname";
ListBox1.DataBind();
}
It's a combination of your given code and my previous code. Thank you very much for your help and patience.
jmpapa
25-Feb-13 7:34am
View
it's just the same with the code you posted above. The error is in this:
ListBox1.DataSource = dt;
ListBox1.DataTextField = "lastname";
ListBox1.DataBind();
I've also tried to use "firstname" in exchange to lastname, but still got the same error.
jmpapa
25-Feb-13 7:03am
View
Got this error:
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'lastname'.
jmpapa
25-Feb-13 7:02am
View
got this error:
Incorrect parameter count in the call to native function 'ISNULL'
jmpapa
25-Feb-13 6:01am
View
Thank you Shubh! I applied your code in mine. And I came up with this:
sqlcon.Open();
string str = "select CONCAT(firstname, ' (' ,lastname,')') AS mixname from userdbase";
da = new MySqlDataAdapter(str, sqlcon);
DataSet ds = new DataSet();
da.TableMappings.Add("table", "empdependentd");
da.Fill(ds, "empdependents");
this.ListBox1.DataSource = this.ds;
this.ListBox1.DataTextField = "empdependents.mixname ";
this.ListBox1.DataValueField = "empdependents.mixname";
sqlcon.Close();
da.Dispose();
However, there's an error with this line:
this.ListBox1.DataSource = this.ds;
in the ds to be specific. What may caused this?
jmpapa
25-Feb-13 5:16am
View
The link is not working. It says, "403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied."
jmpapa
24-Feb-13 11:02am
View
I've solved the problem by just removing the !IsPostBack condition. The problem now is, it just highlight dates in the current year. And also, how can I add a label per date that indicates the name of the holiday highlighted? Any help?
jmpapa
24-Feb-13 11:01am
View
Deleted
I've solved the problem by just removing the !IsPostBack condition. The problem now is, it just highlight dates in the current year. Any help?
jmpapa
21-Feb-13 2:35am
View
Sorry. I just found the real problem. It's not really the checkbox and the hyperlink that conflicts. It is the paging and hyperlink. How to solve this? any idea? Thanks.
jmpapa
17-Feb-13 1:58am
View
I also tried to do this, but then, I'm having an error saying that the variable I used for datakey is not present in the current content. So, I included it in my select query which makes my primary key field visible.
jmpapa
17-Feb-13 1:50am
View
I have tried to do this yesterday but it keeps on having an error saying "Index was out of range. Must be non-negative and less than the size of the collection." I think it's because I'm using a databound. Is there other way to do this?
jmpapa
16-Feb-13 20:46pm
View
I tried to do that but there's an error saying "Index was out of range. Must be non-negative and less than the size of the collection."
I am using a databound. Is it still possible to hide the column? Thank you in advance.
jmpapa
16-Feb-13 5:22am
View
What id there are 3 columns to retrieve and datas will be posted to 3 textbox?
jmpapa
9-Feb-13 22:07pm
View
Thanks for all the respond. I'm already using sessions now. And it works fine.
jmpapa
9-Feb-13 11:16am
View
Thanks.
But, I'm recieving this error
~You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1'''
jmpapa
9-Feb-13 10:54am
View
Thanks for the fast response.
But this program should only show tasks created by a single user.
Let me clarify it, this is actually an online to-do list. Once the user log-in, all the tasks created by him will be retrieved.
So, it is something like.. select * from tasktable where userid = idname (*idname used in log-in)
But, I don't know what the correct command to use.
Show More