15,911,531 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 Muhammad Taqi Hassan Bukhari (Top 70 by date)
Muhammad Taqi Hassan Bukhari
20-Feb-15 2:20am
View
your query returns this,
+-------------------+-------------------------+--------------------------+
| purchase_order_id | Sum_of_ordered_quantity | Sum_of_recieved_quantity |
+-------------------+-------------------------+--------------------------+
| 1 | 300 | 150 |
| 2 | 1500 | 500 |
+-------------------+-------------------------+--------------------------+
you can see in the question that , purchase_order_id 1 has 200 ordered quantity and 150 recieved quantity while purchase_order_id 2 has 500 ordered_quantity and 500 recieved quantity.
Muhammad Taqi Hassan Bukhari
20-Feb-15 2:17am
View
your query didn't returns the correct record.
Muhammad Taqi Hassan Bukhari
20-Feb-15 2:12am
View
what if i want to included item_id as well.
Muhammad Taqi Hassan Bukhari
23-Jan-15 4:05am
View
i want to show this on the web page, i think might be multiple views may help here, i want to group a message of one user and count total then count how many of total status is delivered, failed etc.
Muhammad Taqi Hassan Bukhari
23-Jan-15 2:55am
View
I have updated the question, review it now.
Muhammad Taqi Hassan Bukhari
24-Oct-14 6:35am
View
yeh,
Muhammad Taqi Hassan Bukhari
24-Oct-14 6:29am
View
Is it possible to modify .aspx and its aspx.cs page on live server, with downloaded it and modify then again uploaded>
Muhammad Taqi Hassan Bukhari
24-Oct-14 3:23am
View
In my project, the instructor asked me to live my site on any server, then on each week add new pages to that site. I read on Google that to publish asp.net site, the whole project has to be build. but how this can be done on live server. I have not much knowledge on working with hosting server. so i want to confirm the easiest way that I can do my task.
Muhammad Taqi Hassan Bukhari
22-Oct-14 4:04am
View
Can I play with db, means set passwordFormat value to 0 that is clear. and get the password back in plain text? can this be possible?
Muhammad Taqi Hassan Bukhari
22-Oct-14 4:00am
View
more, if i get the plain password back in some way, i will be more happy.
Muhammad Taqi Hassan Bukhari
22-Oct-14 3:59am
View
yes, this is also the option, but the problem comes when I have to authenticate at login.
get back the user's salt value.
then add to the password that user enters
create hashed of above two and then compare new hashed password with the stored hashed password.
as php, mysql is also not generating the same output using sh1. then it will not authenticate the valid user also.
Muhammad Taqi Hassan Bukhari
22-Oct-14 3:52am
View
yes, i have to convert the whole asp.net application to php. and in mysql have to update all these msql membership password manually in mysql.
Muhammad Taqi Hassan Bukhari
22-Oct-14 3:23am
View
Actually I have to convert this project in php and mysql. As there is not such membership class facility in php mysql. So, if i know the hashing algo i can easily move/insert these in MySQL.
Muhammad Taqi Hassan Bukhari
22-Oct-14 3:15am
View
now see sir, i have updated the question with code also.
Muhammad Taqi Hassan Bukhari
22-Oct-14 3:08am
View
thanks for your support ,
i had wrote the program to match the a user password by using sh1 with same salt value (picked from db). but it does not return the value.
Muhammad Taqi Hassan Bukhari
22-Oct-14 2:49am
View
as my project is using hashing technique, but which hashing algo, on msdn it says hashAlgorithmType="SHA1" defines, but in my web.config there is no such parameter like this. then how could i trace this.
Muhammad Taqi Hassan Bukhari
21-Oct-14 3:47am
View
yes, but what about the admin password, because on admin module only he has the right to approve the new user's account request. and manage other functionalists and generating reports.
Muhammad Taqi Hassan Bukhari
21-Oct-14 3:14am
View
actually the problem is that admin has forget his password in this application, and he also leaves the organization. there is no password recovery option in the product. only change password. but he didn't remember his password. and further more i have decided to move this on MySQL db. so i need to decrypt their password. other wise it is hurle to ask everyone come into the system and change their password.
Muhammad Taqi Hassan Bukhari
21-Oct-14 3:07am
View
I want to retrieve in plain text, so that i can put them back into mysql database through php encryption methods. I have searched on Google and found that if in the configuration file if it's setting is not set to hashed then it can be possible to decrypt it back.
Here is the code that membership using to encrypt the passwords. System.Text.Encoding.Unicode.GetString(MembershipProvider.DecryptPassword(Convert.FromBase64String(encryptedPassword)));
Muhammad Taqi Hassan Bukhari
15-Oct-14 22:56pm
View
I want to run my mvc project on iss server, but when i runs my project, it gives the above mentioned no. 3 error,
Muhammad Taqi Hassan Bukhari
3-Sep-14 18:23pm
View
I have some experience in web based asp.net, now i have new task and started C# for desktop based. i have 1 month to build this application.
Muhammad Taqi Hassan Bukhari
3-Sep-14 18:22pm
View
Yes, Only One application only can import/merge your facebook, gmail contacts and chat with them from one application.
Muhammad Taqi Hassan Bukhari
30-Aug-14 12:20pm
View
I have tried your solution: have a look at it now. https://www.dropbox.com/s/yllgpb5u5twmoku/Shah-e-Waala_Home_Page_-_2014-08-30_21.12.42.png?dl=0
But still facing problem. because the navigation is not in the center of the div vertically.
Here is the css code for that div.
.Menu-bar-in-the-header{
width:100%; float:left;
height:30px;
line-height:normal; z-index:-5;
}
Muhammad Taqi Hassan Bukhari
18-Aug-14 10:44am
View
I have change name, but the same error.
Muhammad Taqi Hassan Bukhari
12-Aug-14 8:19am
View
Look at this point of endpoint configuration...
<!-- Service Endpoints -->
<endpoint address="../Service1.svc" binding="webHttpBinding" contract="JSONWebService.IService1" behaviorconfiguration="webBehaviour">
Muhammad Taqi Hassan Bukhari
12-Aug-14 8:01am
View
Deleted
Yes i am following his tutorial step by step... the only difference is that i am using visual studio 2013 and 4.5 framework.
Muhammad Taqi Hassan Bukhari
4-Aug-14 3:13am
View
I have found articles some says WCF jason service, some says restfull apis and other stuff. as i don't have enough knowledge of web services and which would be better in my case.
Muhammad Taqi Hassan Bukhari
1-Jul-14 7:58am
View
Can you suggest an api
Muhammad Taqi Hassan Bukhari
17-Jun-14 5:23am
View
tried to insert the hard coded values and it works......
Muhammad Taqi Hassan Bukhari
17-Jun-14 0:17am
View
i have tried your sp, but still facing same problem, the problem is column UpdatedOn is being updated but not Title, Body and Categories. and also the last statement executes Response.Write("Updatation Successfull");
Muhammad Taqi Hassan Bukhari
17-Jun-14 0:08am
View
ViewState["notifictid"] has the value , the problem is column UpdatedOn is being updated but not Title, Body and Categories. and also the last statement executes Response.Write("Updatation Successfull");
Muhammad Taqi Hassan Bukhari
10-Jun-14 2:51am
View
that solved not it gives
System.InvalidCastException: Specified cast is not valid. at Registration_Requestaccount.BtnSubmit_Click(Object sender, EventArgs e) in e:\ECCII\Registration\Requestaccount.aspx.cs:line 180
and the line 180 is
success = (bool) (db1.sqlcmd.Parameters["@success"].Value);
and the line
db1.sqlcmd = new SqlCommand("uspAccountRequest");
using (SqlDataAdapter sda = new SqlDataAdapter())
{
db1.sqlcmd.CommandType = CommandType.StoredProcedure;
db1.sqlcmd.Parameters.AddWithValue("@FirstName", Firstname);
db1.sqlcmd.Parameters.AddWithValue("@LastName", Lastname);
db1.sqlcmd.Parameters.AddWithValue("@CNIC", cnic);
db1.sqlcmd.Parameters.AddWithValue("@Email", email);
db1.sqlcmd.Parameters.AddWithValue("@Party", DDParty.SelectedValue);
DateTime parsed;
if (DateTime.TryParseExact(tbxpartyjoinson.Text, "dd-MM-yyyy",
CultureInfo.CurrentCulture, DateTimeStyles.None, out parsed))
{
db1.sqlcmd.Parameters.AddWithValue("@PartyJoiningDate", parsed);
}
else
{
// error in conversion, set null or date time min value to parameter
// or if this is required parameter, show error to user and exit the operation
}
//db1.sqlcmd.Parameters.AddWithValue("@PartyJoiningDate", Convert.ToDateTime(tbxpartyjoinson.Text));
db1.sqlcmd.Parameters.AddWithValue("@Constituency", DDConstituency.SelectedValue);
db1.sqlcmd.Parameters.Add("@success", SqlDbType.Bit);
db1.sqlcmd.Parameters["@success"].Direction = ParameterDirection.Output;
db1.sqlcmd.Connection = db1.sqlcon;
db1.sqlcon.Open();
reqid = Convert.ToInt32(db1.sqlcmd.ExecuteScalar());
success = (bool) (db1.sqlcmd.Parameters["@success"].Value);
Muhammad Taqi Hassan Bukhari
31-May-14 16:08pm
View
Ok... thanks.. i start this task and let you know.
Muhammad Taqi Hassan Bukhari
31-May-14 16:02pm
View
didn't know how to achieve his,, i Google this but not found anything.
tries to achieve this through data pager and list view but didn't find the way i wanted.
Muhammad Taqi Hassan Bukhari
31-May-14 7:23am
View
Yes i had use http://www.videojs.com/ video player but it doesn't play videos on aspx page. but when the same code on .html page works....
Muhammad Taqi Hassan Bukhari
31-May-14 5:49am
View
i tried to pass all parameters into the update parameter, but i have to validate that other than the 6 parameters i specified above should not be update-able, i have made those field read only or invisible, then when the update command occurs, it pass null values to those whose field i set read only or invisible.
Muhammad Taqi Hassan Bukhari
31-May-14 5:45am
View
The Select Columns and the Update Parameters should match in order to update using SqlDataSource, then what to do because i have to display all parameters from the table and update only Title ,Body,Author, Categories, Updatedby .... is there any other way to achieve this or an trick...
]
Muhammad Taqi Hassan Bukhari
29-May-14 2:42am
View
In the update parameter i have to pass user id and current date on which updated occurs.
Muhammad Taqi Hassan Bukhari
17-May-14 17:44pm
View
Any Specific Reason Sir,?
Muhammad Taqi Hassan Bukhari
12-May-14 7:34am
View
What if i have to do it on server side.
Muhammad Taqi Hassan Bukhari
11-May-14 18:42pm
View
i have to do both
Muhammad Taqi Hassan Bukhari
10-May-14 15:32pm
View
But the @Userid and @ConstID is not in the table TblPackages. These are comming from the aspx page through session.
Muhammad Taqi Hassan Bukhari
10-May-14 15:02pm
View
Yes you are right, it put dummy data for testing and multiple subscription are there for one userid.
Muhammad Taqi Hassan Bukhari
10-May-14 13:27pm
View
Problem Solved, But Can you tell me the Reason of my mistake and logic of your solution.
Muhammad Taqi Hassan Bukhari
8-May-14 16:55pm
View
I am beginner to sql, and dint know how to achieve multiple quires at once.
Muhammad Taqi Hassan Bukhari
3-May-14 6:36am
View
Problem solved. but Can you give me some explanation for <%=TextBox2.ClientID%>
Muhammad Taqi Hassan Bukhari
2-May-14 9:04am
View
I have passed 10 parameters, but in the insert query the last two values are hard-coded value and their datatype is bit so i put direct 0(false).
Muhammad Taqi Hassan Bukhari
2-May-14 2:45am
View
I have done above 20 sp in my project, all have done in the same way as the above, but they gives error, but this one its frustrating... hard to find where is the mistake.
Muhammad Taqi Hassan Bukhari
2-May-14 2:42am
View
Still facing the same problem
Muhammad Taqi Hassan Bukhari
2-May-14 2:42am
View
db1.sqlcmd.CommandType = CommandType.StoredProcedure;
db1.sqlcmd.Parameters.AddWithValue("@UserID", Convert.ToInt32(AppUserID));
db1.sqlcmd.Parameters.AddWithValue("@packageType",Convert.ToString(ViewState["packtype"]));
db1.sqlcmd.Parameters.AddWithValue("@Cost", Convert.ToDouble(ViewState["packagecost"]));
db1.sqlcmd.Parameters.AddWithValue("@MaxNotific",Convert.ToInt32(ViewState["mxnotificaton"]));
db1.sqlcmd.Parameters.AddWithValue("@MaxVideos",Convert.ToInt32(ViewState["mxvidoes"]));
db1.sqlcmd.Parameters.AddWithValue("@MaxArticles",Convert.ToInt32(ViewState["mxarticles"]));
db1.sqlcmd.Parameters.AddWithValue("@MaxEvent", Convert.ToInt32(ViewState["mxevents"]));
db1.sqlcmd.Parameters.AddWithValue("@MaxAllias",Convert.ToInt32(ViewState["mxallias"]));
db1.sqlcmd.Parameters.AddWithValue("@ConstID",Convert.ToInt32(DDConstituency.SelectedValue));
Muhammad Taqi Hassan Bukhari
2-May-14 2:18am
View
Create Table TblSubscription
(
SubscriptionId int identity(1,1) Primary key,
UserId INT NOT NULL Foreign key References TblAppUser(UserId),
PackageId INT NOT NULL Foreign key References TblPackages(PackageID),
ConstID INT NOT NULL Foreign key References TblConstituency (ConstID),
StartDate datetime,
FinishDate datetime,
MaxNotification int,
MaxArticles int,
MaxVideos int,
MaxEvent int,
MaxAllias int,
IsActive bit,
IsPaid bit
);
Create Proc uspSetSubscriptions
@packageType varchar(25), @UserID int, @ConstID int,
@MaxNotific int, @MaxArticles int, @MaxVideos int,@MaxEvent int,@MaxAllias int,@Cost float
AS
BEGIN
--DECLARE @PackageId int
--SELECT @PackageId = PackageID FROM TblPackages WHERE Category = @packageType
INSERT INTO TblSubscription(UserId, PackageId, ConstID, StartDate, FinishDate, MaxNotification, MaxArticles, MaxVideos, MaxEvent, MaxAllias, IsActive, IsPaid)
VALUES(@UserID,1,@ConstID,GetDate(),GETDATE()+30,@MaxNotific,@MaxArticles,@MaxVideos,@MaxEvent ,@MaxAllias,0,0) SELECT @@IDENTITY
SELECT SCOPE_IDENTITY() -- Subscription id
END
Muhammad Taqi Hassan Bukhari
2-May-14 1:01am
View
Still the same error, Procedure or function uspSetSubscriptions has too many arguments specified
Muhammad Taqi Hassan Bukhari
23-Apr-14 14:04pm
View
Msg 8110, Level 16, State 0, Line 1
Cannot add multiple PRIMARY KEY constraints to table 'TblPayment'.
Muhammad Taqi Hassan Bukhari
20-Apr-14 4:56am
View
When i click on Test Query it raise up an error message that @UserID have wrong datatype or it is mismatched.
Muhammad Taqi Hassan Bukhari
19-Apr-14 1:56am
View
This is OK, now how would i have to catched these parameters in asp.net, is the normal way that we get out parameters???? like this
db1.sqlcmd.Parameters.Add("@RLoginDate", SqlDbType.VarChar, 20);
db1.sqlcmd.Parameters["@RLoginDate"].Direction = ParameterDirection.Output;
LabelLastLogin.Text = (string)db1.sqlcmd.Parameters["@RLoginDate"].Value;
Muhammad Taqi Hassan Bukhari
18-Apr-14 19:55pm
View
My professor told me to only use store procedure not queries. So, i have to get this using store procedure
Muhammad Taqi Hassan Bukhari
18-Apr-14 5:50am
View
Thanks. Mr. Snooze, The query works. Thanks Alot.
Muhammad Taqi Hassan Bukhari
17-Apr-14 1:35am
View
That's Work fine. But i have now a problem, that i want to get recent login time, but my program is gives me the current login time. because its store procedure is called first.
CREATE PROC uspGetRecentLogin
@UserID int,@RLoginDate varchar(20) OUT
AS
BEGIN
SET @RLoginDate= (SELECT TOP 1 LoginDate FROM TblLoginDetails WHERE UserId=@UserID ORDER BY LoginDate DESC)
END
I have think a solution to simply get the 2nd last login date.
Now I want to know that how could i get the 2nd last recent login data against a User id.
Muhammad Taqi Hassan Bukhari
11-Apr-14 15:24pm
View
No Sir, Your Suggested Code doesn't work.
I have this code and this is perfectly working.
string activationCode = Guid.NewGuid().ToString();
string sqlquery = "INSERT INTO UserActivation VALUES(@UserId, @ActivationCode)";
db1.sqlcmd = new SqlCommand(sqlquery, db1.sqlcon);
using (SqlDataAdapter sda = new SqlDataAdapter())
{
db1.sqlcmd.CommandType = CommandType.Text;
db1.sqlcmd.Parameters.AddWithValue("@UserId", userId);
db1.sqlcmd.Parameters.AddWithValue("@ActivationCode", activationCode);
db1.sqlcmd.Connection = db1.sqlcon;
db1.sqlcon.Open();
db1.sqlcmd.ExecuteNonQuery();
db1.sqlcon.Close();
}
but when i do this using store procedure it doesn't work
Muhammad Taqi Hassan Bukhari
3-Apr-14 5:19am
View
But what about if i had to show the data of that person who is currently login, not the whole data of the table in the Gridview.
Muhammad Taqi Hassan Bukhari
1-Apr-14 9:00am
View
oh....Got it
Muhammad Taqi Hassan Bukhari
1-Apr-14 6:10am
View
No Sir, That also doesn't work. A Person told me that MySQL server 2012 doesn't support LIMIT Clause and therefore Use the TOP Clause. and it works. I am also thankful to you for your precious time.
SELECT TOP 5 Msg FROM TempNoti WHERE UserID = 75 ORDER BY MsgDate DESC;
Muhammad Taqi Hassan Bukhari
1-Apr-14 4:20am
View
When i write this query it Perfectly works
SELECT Msg FROM TempNoti WHERE UserID = 87 ORDER BY Date DESC;
But When I use this query:
SELECT Msg FROM TempNoti WHERE UserID = 87 LIMIT 5 ORDER BY Date DESC;
then It gives the following error:
Incorrect syntax near 'LIMIT'
Muhammad Taqi Hassan Bukhari
24-Mar-14 12:44pm
View
Just build the basic Login panels for admins and users. Now going to start main pages.. and want to implement sidebar.. wanted to know that what kind of knowledge is needed to implement the sidebar.
Muhammad Taqi Hassan Bukhari
14-Mar-14 5:54am
View
Is Android support .mdf database.????
Muhammad Taqi Hassan Bukhari
23-Feb-14 11:33am
View
the given input is ok. sir, but Still giving Error:
System.Data.OleDb.OleDbException (0x80040E14): Syntax error in INSERT INTO statement. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Signup.Button1_Click(Object sender, EventArgs e) in d:\Projects\Signup.aspx.cs:line 36
line 36 is :oleDbCmd.ExecuteNonQuery();
Muhammad Taqi Hassan Bukhari
23-Feb-14 11:29am
View
Still the same error:
System.Data.OleDb.OleDbException (0x80040E14): Syntax error in INSERT INTO statement. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Signup.Button1_Click(Object sender, EventArgs e) in d:\Projects\Signup.aspx.cs:line 33
Line 33 is : oleDbCmd.ExecuteNonQuery();
Muhammad Taqi Hassan Bukhari
14-Oct-13 12:49pm
View
I was more interested in Android than php. A advice and suggestion from seniors helps a lot me to go ahead and choose what i like (Android and Java Programming).
Muhammad Taqi Hassan Bukhari
14-Oct-13 12:46pm
View
Thanks Andreas, that's a nice advice.
Muhammad Taqi Hassan Bukhari
13-Oct-13 15:14pm
View
I love doing java programming that's why i am more interested in Andriod, i also had done some uni projects in php, java, C++ and Assembly X86. but now for the final project i am confused between Adnriod and php a bit. May be its a fear about not getting the Job after the uni.
Show More