15,893,663 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 mgoad99 (Top 52 by date)
mgoad99
21-May-18 18:22pm
View
Thank you so much for that tip! I believe I have fixed the issue by copying the user profile data for the gpg application in question to the default user profile.
mgoad99
11-Jul-17 18:32pm
View
I'm unclear if you have an MVC question or EF question. Either way, I do think your approach may be off.
I recommend the series of tutorials on MVC from Microsoft. For me, having an example is a great way to figure out how to get something working.
This is a link to a specific tutorial, but there are many more on this site.
https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/database-first-development/
Maybe looking thru the tutorial may help point you in the right direction.
mgoad99
13-Mar-14 12:55pm
View
Try looking into pivot. There is a article on the code project here:
http://www.codeproject.com/Tips/500811/Simple-Way-To-Use-Pivot-In-SQL-Query
mgoad99
14-Feb-14 16:18pm
View
you already answered your questions:
"I removed all of the code and needed assemblies"
mgoad99
13-Feb-14 15:03pm
View
I would like to help you more, but it is hard without seeing how you have things setup.
The thing i find suspicious is 'KCDCSS-SQL\EContacts'. That sounds like a local account on a server. is that the server where SQL and the reporting services instance are installed? Are you trying to deploy a report from visual studio? if so, you are running visual studio on the server?
mgoad99
12-Feb-14 16:17pm
View
try running the value of the mySqlCommand directly in SQL Server Management Studio.
Does that return a record? that can help to start narrow down what the problem is.
mgoad99
3-Feb-14 18:26pm
View
I have a few applications that have used SMTP to send an email to a local SMTP server inside my domain. I also send email within the domain. For me, I had to go onto the box that was setup as the SMTP server and add the IP address of my PC (where i was testing) and any other PC or server that is sending the mail. In the properties for the SMTP server there are relay restrictions. I added the ip addresses i need there.
If that is the problem, here is an article that may help
http://technet.microsoft.com/en-us/library/aa996446(v=exchg.65).aspx
I hope that helps or at least points you in the right direction. Good luck!
mgoad99
3-Feb-14 9:59am
View
Things like that happen to everyone. It is hard to find the "silly mistakes" when you are looking at your own code. Sometimes you just need another person to see it. :)
mgoad99
31-Jan-14 15:31pm
View
my experience with PHP is pretty limited, but shouldn't you have quotes around email and pass when you are using them in the post array:
$email = ($_POST["email"]) ;
$pass = ($_POST["pass"]) ;
http://www.php.net/manual/en/reserved.variables.post.php
mgoad99
15-Jan-14 18:21pm
View
There is no checkbox control for a SSRS report. it sounds like you want to drill down. Try reading about drill down reports in SSRS.
mgoad99
5-Dec-13 16:25pm
View
Thanks RaisKazi, i am going to try the approach in the technect link
mgoad99
3-Dec-13 13:35pm
View
http://stackoverflow.com/questions/16134733/html-javascript-simple-form-validation-on-submit
Do some research, try some things, and post a specific question if you get stuck.
mgoad99
3-Dec-13 12:59pm
View
I think that the way the validation controls are designed, if the input is invalid, it displays the message and stops the form from submitting. I dont see anyway to change that to show the message AND still have the form submit.
What you may need to do is not use the validation controls. Instead implement the functionality you want using JavaScript. I would start with writing javascript for when the form submits to check the values of those controls, display a message to the user, then submit the form.
mgoad99
3-Dec-13 12:50pm
View
That is what should happen. If the values are not valid, when the submit button is clicked, you get the message and the form is not submitted. It sounds like you was a validation message AND have the page submit too? that is not how the validation controls work.
mgoad99
3-Dec-13 12:42pm
View
Try changing CausesValidation = "False" to "True":
<asp:Button ID="ButtonSubmit" runat="server" CausesValidation="True" onclick="ButtonSubmit_Click"
Text="Submit" Width="75px" />
mgoad99
1-Nov-13 10:00am
View
I answered a similar question a while back. Check that out, hopefully it will help.
http://www.codeproject.com/Answers/656025/IIS-Error-on-localhost-for-ASP-NET-Web-App#answer1
mgoad99
31-Oct-13 16:10pm
View
I cant say for sure without more info, like an error message, some code. But, my instinct says that the problem is most likely a security issue.
When you run your application in visual studio, it runs under the account you are logged in as. That is most likely the account that is used to connect to the database.
When you run under iis, the account that is used to connect to the database is different than on your machine with visual studio most likely would not have access.
mgoad99
16-Oct-13 16:30pm
View
What happens when you click submit? Do you get an error message, does it redirect to the login page?
mgoad99
8-Oct-13 14:13pm
View
I can only guess by looking at the names of the database field in the SQL statement... but i would say that INST_ID is an integer (primary key for a school?) and you are using the textboxschool.text.tostring, which is the schools name. I hope that helps.
mgoad99
3-Oct-13 17:41pm
View
hmmm... i think you want and, not or
if ((@Name is not null) or @Name <> '')
mgoad99
30-Sep-13 13:59pm
View
One quick thing i noticed, above the line commenting out declaring @fileName
SET @Image_Path = ""
You use double quotes "" try single quotes instead ''
Maybe that is the cause of you problem?
mgoad99
25-Sep-13 14:02pm
View
At first glace, it sounds like the code you have to reduce the quantitiy runs twice. Have you tried setting a break point or some other debugging technique?
mgoad99
24-Sep-13 12:37pm
View
Isn't DataCard_No the related field that is in each table?
mgoad99
23-Sep-13 14:44pm
View
Just to confirm the default url to the report manager should look like this:
http://ServerNameWhereYouInstalledSSRS/Reports
mgoad99
19-Sep-13 15:33pm
View
I'm not sure what you are asking, but try it out by setting it up and see how it works.
mgoad99
19-Sep-13 13:12pm
View
Yep, to move it to a server, the setup should be the same as what you did on your local pc. Yes, i think you will still have the same error with the database connection.
mgoad99
19-Sep-13 12:26pm
View
You can try that. My guess will be that that is a local account on your pc. Which means that the server will not accept that. SQL Server will only be able to "see" domain accounts.
Like i said, i normally create a new SQL account and then put that in the connection string.
But, as i understand here are the options you have
1) create a SQL account and hardcode the user name and password in your connection string (as i explained above). If this is in the web.config file and you are concerned about security, you can encrypt this. I have done that with one intranet app i have. There are a lot of articles on how to encrypt.
http://stackoverflow.com/questions/2289230/opening-sql-connection-from-iis7
2) Setup your app in the web.config file to impersonate a domain account. This means the web app will no longer run under SACS-COC\SPARE-PC$, but some domain account of your choosing that has access to the database. Again, username and password will be in the web.config and you may want to encrypt that.
<identity impersonate="true" username="domain\username" password=" password">
http://www.codeproject.com/Articles/107940/Back-to-Basic-ASP-NET-Runtime-Impersonation
You will need to do some research to figure out what will work best for you.
mgoad99
19-Sep-13 12:07pm
View
When you run in visual studio, it runs under the account logged onto the pc. When you run from IIS7 (regardless of if on a server or your local pc) the web app runs under that local account SACS-COC\SPARE-PC$ in your case. That account will not normally have access to your database. See my solution below. Hope that helps
This is one of the pains of running in visual studio for testing. Things work fine, but then when moved to IIS7 some things may break.
mgoad99
19-Sep-13 11:58am
View
Deleted
Whoops, clicked submit by accident.
Now, when you set things up in IIS, by default (unless you have done something else), the web app will run under a local account on that server. Which sounds like the case for you since the error message says: login failed for user 'SACS-COC\SPARE-PC$'
What i normally do is in the web.config where i keep connection strings i pass a username and password for a SQL account that has access to the database. Like this:
<add name="MyConnectionString" connectionstring="Data Source=<ServerName>;Initial Catalog=<DBName>;Persist Security Info=True;User ID=<SQL Account User ID>;Password=<password>"
="" providername="System.Data.SqlClient">
This isn't the most secure since you will have plain text username and password in the web.config file. There are ways to encrypt and other ways to do this too. But, i hope this gives you enough info on WHY the error is happening and points you in a direction to find a solution that works for you.
mgoad99
19-Sep-13 11:53am
View
Deleted
When you run in visual studio, your app runs under the account you are logged onto your computer as. For me, i am usually logged in as an adminstrator with full access to my databases. The same may be true for you.
Now, when you set things up in IIS, by default (unless you have done something else), the web app will run under a local account on that server. Which
mgoad99
11-Sep-13 13:22pm
View
It is pretty obvious looking at your question that you are using mysql. Sorry about my assumption.
In case it helps, here is a link to documentation for connection to a mysql db.
http://php.net/manual/en/function.mysql-connect.php
mgoad99
6-Aug-13 17:16pm
View
Is javascript disabled in your browser?
mgoad99
5-Aug-13 15:58pm
View
I believe so.
mgoad99
30-Jul-13 14:49pm
View
Deleted
Your question did not give much to go on. Is this a website? when you say table do you mean a gridview control?
Anyways, my guess would be that this is a webpage and that when it loads the table is bound/populated. Then at some point later, you dynamically add rows. When the textbox posts back, the table is rebuilt and the rows you had added are not added again.
mgoad99
30-Jul-13 14:49pm
View
Your question did not give much to go on. Is this a website? when you say table do you mean a gridview control?
Anyways, my guess would be that this is a webpage and that when it loads the table is bound/populated. Then at some point later, you dynamically add rows. When the textbox posts back, the table is rebuilt and the rows you had added are not added again.
mgoad99
26-Jul-13 11:29am
View
I think I would consider having 2 datagridviews, one for each way of showing the rows/columns. I would set one to invisible and on the button push toggle the visibility. Just an idea to throw out there.
mgoad99
23-Jul-13 18:22pm
View
Try removing the if @@ERROR = 0 before the COMMIT line.
If you get to that point without having already saying ROLLBACK, then COMMIT. No need to check first.
I think that is why you are getting the error: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements
mgoad99
12-Jul-13 12:42pm
View
You would have to do something like dt.Tables(0).Rows(0).Item("Field01")
You are using a dataset which is made up of 1 or more tables. each table has 1 or more rows. Each row has 1 or more items. To get an item, you do have to specify the table, and row.
mgoad99
3-Jul-13 13:47pm
View
I have not had the same exact problem you describe, but i do know that users have to install an active x control to print from the report viewer (same as if running the report directly in the report manager). Typically, the first time a user tries to print they will get a message asking them to install the control. After they install it, they do not get that message anymore. Maybe there is an issue with the control that is giving your users a small black box instead of the message to install?
mgoad99
3-Jul-13 13:18pm
View
Have you stepped thru your code while debugging?
Does the line to delete the category ever get reached (the part inside if (li.Selected == false && myCount > 0) )?
I wonder if the line
int myCount = (int)myAdapter.FindCategoryBySLA_IDAndChoice_ID(CurrentSLA_ID, CurrentChoice_ID);
is not returning the correct value and therefore you never enter inside the if statement to do the delete?
mgoad99
28-Jun-13 17:42pm
View
I have wished for a checkboxlist in MVC also. As of the most recent version MVC4 there is still no built in HTML helper for that. There are some articles that explain how to create your own. Here is one example on Codeproject
http://www.codeproject.com/Articles/292050/CheckBoxList-For-A-missing-MVC-extension
mgoad99
18-Jun-13 17:17pm
View
Sorry, i am out of ideas for you. Based on what you posted is your code, the selected index changed event is empty. You have the code to play the movie on button1 click, which i dont understand what you are doing there. I would say the code is good, maybe the problem is the which events you have it in. Good luck!
mgoad99
18-Jun-13 16:06pm
View
What is the problem you are having with your code?
One thing, I believe if you want it to auto play when the selected item changes, you need to set the auto postback property on the listbox control to true.
ex: <asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True">
mgoad99
17-Jun-13 15:30pm
View
I use SQL Server and not Oracle, but i would do all that in one transaction. If the insert/update/delete leaves the balance unacceptable, then rollback the transaction. Basically something like these steps:
Begin Tranaction
Do the insert/update/delete.
Check the balance.
If not a good value, then rollback the transaction.
End Transaction
mgoad99
17-Jun-13 15:26pm
View
First, I don't see a 'name_field' in your query. If that is the 1st field, then on the first select statement do this: SELECT "type" as name_field
Then after the last select statement, add ORDER BY 'name_field' DESC. This will order the entire set (the combined data from all of the select statements) by the name_field
mgoad99
14-Jun-13 18:28pm
View
This is a bit rough, but maybe it will help you.
ReportParameter myParm = new ReportParameter("ParmName", "set Parm Value from your data source");
this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { myParm });
mgoad99
13-Jun-13 14:17pm
View
It may be that since Availability Day has a space you would need to use brackets [Availability Day]
mgoad99
24-May-13 18:29pm
View
You need to add a group to your report with the company name and sum(amount) as you described then the detail row for that group will have the account number, date and amount. You should be able to do that with the wizard for creating a new report.
To get the + - icon correct, you need to change the visibility correctly.
Here is a good tutorial showing you set by step how to do this
http://www.mssqltips.com/sqlservertip/1329/drill-down-techniques-in-ssrs-with-the-visibility-property/
Good luck
mgoad99
23-May-13 11:17am
View
Deleted
A couple of things I noticed.
You are doing this in your web.cofig:
<pre>
<location path="~/elmah.axd">
<system.web>
<authorization>
<allow roles="Administrator">
<deny users="*">
</pre>
Now, if that is setup correctly, when someone not in the administrator group tries to view the elmah page, it will give them an access denied message. There is no reason to check again in the global.asax.
Try changing:
<pre>
<location path="~/elmah.axd">
</pre>
To:
<pre>
<location path="elmah.axd">
</pre>
Even if you MUST check in the global.asax for some reason, the place would not be application_BeginRequest
Here is a link to an article that may help you find the right method to use in the Global.asax
http://stackoverflow.com/questions/3072768/net-application-beginrequest-how-to-get-user-reference
mgoad99
23-May-13 11:12am
View
Deleted
A couple of things I noticed:
You are doing this in your web.cofig:
<location path="~/elmah.axd">
<system.web>
<authorization>
<allow roles="Administrator">
<deny users="*">
Now, if that is setup correctly, when someone not in the administrator group tries to view the elmah page, it will give them an access denied message. There is no reason to check again in the global.asax.
Try changing:
<location path="~/elmah.axd">
To:
<location path="elmah.axd">
Even if you MUST check in the global.asax for some reason, the place would not be application_BeginRequest
Here is a link to an article that may help you find the right method to use in the Global.asax
http://stackoverflow.com/questions/3072768/net-application-beginrequest-how-to-get-user-reference
mgoad99
23-May-13 11:07am
View
Deleted
A couple of things I noticed:
You are doing this in your web.cofig:
<location path="~/elmah.axd">
<system.web>
<authorization>
<allow roles="Administrator">
<deny users="*">
Now, if that is setup correctly, when someone not in the administrator group tries to view the elmah page, it will give them an access denied message. There is no reason to check again in the global.asax.
Try changing:
<location path="~/elmah.axd">
To:
<location path="elmah.axd">
Even if you MUST check in the global.asax for some reason, the place would not be application_BeginRequest
Here is a link to an article that may help you find the right method to use in the Global.asax
http://stackoverflow.com/questions/3072768/net-application-beginrequest-how-to-get-user-reference
mgoad99
22-Oct-12 17:09pm
View
I think n.podbelski's comment about the role manager is helpful. It seems like you may need to implement a custom membership provider. I'm sorry I can't help you more. But, that may be something to check into. Good luck.
Show More