16,021,464 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 Naseer A Khan (Top 20 by date)
Naseer A Khan
5-Apr-13 6:59am
View
sorry sir still having same issue
Naseer A Khan
5-Apr-13 6:55am
View
sir still having same error
Naseer A Khan
5-Apr-13 6:46am
View
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'group'.
i tried this query but its prompt me this error
Naseer A Khan
5-Apr-13 6:43am
View
sorry sir i am not getting what u are trying to ask me...?
Naseer A Khan
5-Apr-13 6:42am
View
actually i am generating MSchart report due to this i am getting data table from my Data base
and i am using Command type "Query" so for this purpose i am using this Query..
i am selecting all patients by date those all patients belong this company which ID is 150.
Naseer A Khan
5-Mar-13 6:58am
View
sir i have removed this condition from both places and Run my Project now i have this Error
ERROR: Unable to cast object of type 'System.Byte[]' to type 'System.IConvertible'.
Naseer A Khan
5-Mar-13 6:32am
View
sir i have made some changes as you mentioned but now its give me an error on next
line i.e
Error:
if (totalExp == "")
{
totalExp = "0";
}
Operator '==' cannot be applied to operands of type 'double' and 'string'
Cannot implicitly convert type 'string' to 'double'
Code:
string GetAmountInBank(string Bank)
{
string strSQL = "select Sum(AmountinBank) from BankAccount,accountitem,accountcategory where accountitem.ItemcatID=accountcategory.CategoryID and BankAccount.ItemID=accountitem.ItemID and accountcategory.IsExpense=1 and BankId like '" + Bank + "'";
double totalExp = Convert .ToDouble ( db.selectquery_One(strSQL));
if (totalExp == "")
{
totalExp = "0";
}
Naseer A Khan
5-Mar-13 5:10am
View
sir db.selecrtquery return my complete query in strSQl
Naseer A Khan
5-Mar-13 5:06am
View
and sir i have pasted my both screen shot on word file and still i am confuse how to send this file.. well sir i have copied my Method you can check it..
Naseer A Khan
5-Mar-13 5:03am
View
Sir here is my selectquery_One method:
public object selectquery_One(string query)
{
object obj="";
cammMYSQL = new MySqlCommand(query, connMYSQL);
try
{
if (connMYSQL.State == ConnectionState.Closed)
connMYSQL.Open();
obj=cammMYSQL.ExecuteScalar();
if (connMYSQL.State == ConnectionState.Open)
connMYSQL.Close();
if (obj == null) obj = "";
return obj;
}
catch (Exception e)
{
if (connMYSQL.State == ConnectionState.Open)
connMYSQL.Close();
return obj;
}
}
Naseer A Khan
5-Mar-13 3:58am
View
sir i have debug point to point my code and in both variable totalDep and totalExp System.Byte[]
array shown.. and i have taken screen short during debug so is there any way to send you these screen shot...
Naseer A Khan
5-Mar-13 3:44am
View
sir i have change Convert.ToDouble to Double.TryParse or Double.Parse but still having same issue
Naseer A Khan
5-Mar-13 3:42am
View
in my code sir you can see totalDep and totalExp both are variable those data type is String
Naseer A Khan
5-Mar-13 3:31am
View
sir after your commit i have changed my Complete query to this query
"select Sum(AmountinBank) from BankAccount ";
but again sir i am having same problem..
Naseer A Khan
5-Mar-13 3:01am
View
but sir i have run this query alone its fetching record..
Naseer A Khan
5-Mar-13 2:47am
View
sir I have posted my complete code..
Naseer A Khan
5-Mar-13 2:46am
View
one thing more i have checked my Query its fetching amount from Database..
Naseer A Khan
5-Mar-13 2:44am
View
sir i have a Bank Combo Box in my form in which list of bank is fetch from database through Select query and when i select any bank name it should bring that Bank amount from Amount TABLE unfortunately it is not done like that and this error is prompt which i have mentioned above.
Naseer A Khan
2-Mar-13 2:12am
View
One thing more i.e
in (totalDep) or in (totalExp) the System.Byte[] array in fetched, i just mark the break point on my method and then Run my code line by line so i found this Error.
Naseer A Khan
2-Mar-13 2:02am
View
I have posted my Complete Code now please help me to resolve this problem.
Show More