|
rachel_m wrote: I tried what you suggested and that did not work.
What does that mean? Did it not compile, or did you get an exception during execution? If yes, can you post the message here?
rachel_m wrote: do you have any other suggestions?
Convert.ToInt32, but the TryParse method should work too. I suggest you try again.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
the
Convert.ToInt32 worked. Thanks!
|
|
|
|
|
Use TryParse, not Convert.
|
|
|
|
|
What did your code look like at this point? If TryParse isn't working, then you don't have a valid integer in there. What exactly does this value contain?
|
|
|
|
|
There was an article written by Roman Kiss that a former co-worker used as a basis for our software.
Using the COM+ Event System service in the .Net Application.[^]
This was back when Windows XP was popular, now when I take this code and try to run it in Windows 7 I get a bunch of access denied errors on the registry keys in the article. I can get around this by editing the registry and taking ownership away from TrustedInstaller and giving it to Administrators and then giving permissions where needed.
The problem is it still does not work after this. I also tried upgrading everything to .net 4 but that did not change anything. I need to get this working so I can upgrade our software from Windows XP to 7 and then move everything into .net 4.
The problem I notice in debugging is that the Subscriber Write method never actually gets called.
When registering EventClass.dll the first error I get is access denied on {4E14FBA2-2E22-11D1-9964-00C04FBBB345}. If I take ownership of this I then get errors on the next one in line, once I cover all those I just get and OLE HRESULT error (can't remember exactly) at this point I had to do some major digging to get at the right registry keys to make EventClass.dll register.
I had to change all of the following registry keys:
• CLSID
o 4E14FBA2-2E22-11D1-9964-00C04FBBB345
o 7542E960-79C7-11D1-88F9-0080C7D771BF
o 00020420-0000-0000-C000-000000000046
o 00020421-0000-0000-C000-000000000046
o 00020422-0000-0000-C000-000000000046
o 00020423-0000-0000-C000-000000000046
o 00020424-0000-0000-C000-000000000046
o 00020425-0000-0000-C000-000000000046
• Interface
o 4E14FB9F-2E22-11D1-9964-00C04FBBB345
o 4A6B0E15-2E38-11D1-9965-00C04FBBB345
o 4A6B0E16-2E38-11D1-9965-00C04FBBB345
o 64B8F404-A4AE-11D1-B7B6-00C04FB926AF
o B5A1729E-B721-3121-A838-FDE43AF13468
• HKLM\Software\Classes\TypLib
o 4E14FB90-2E22-11D1-9964-00C04FBBB345
Don't necessarily concern yourself with these keys there may be a better way.
If anyone can make this work or has ideas on how to make it work I would really appreciate your help.
Thank you,
Brett
|
|
|
|
|
Two major points to consider:
- Security issues on Windows 7. The access to registry keys in ROOT and LOCAL MACHINE is severly restricted, non-administrative users must nit write there.
- 32bit/64bit issues: 32bit applications' registry access gets redirected to the Wow6432Node . 32bit applications must not load 64bit dlls and vice versa.
|
|
|
|
|
Good afternoon,
I have a simple form that using c# server side validation. When using a radio button or dropdownlist with autopostback, I have to call Page.Validate(); within the code behind method. When I do this, it does not run the Javascript on the page that overrides the default functions of the c# validation.
How can I get the javascript - ValidatorUpdateDisplay function to run when i call the Page.Validate() call in the autopostback method?
Thanks in advance!
Rob
Javascript:
<pre lang="cs">
ValidatorUpdateDisplay = function (val) {
var ctl = $('#' + val.controltovalidate);
var eCount = 0;
for (var i = 0; i < Page_Validators.length; i++) {
var v = Page_Validators[i];
if (v.controltovalidate == val.controltovalidate) {
if (!v.isvalid) {
eCount++;
ctl.addClass('validationError');
$('td.question:eq(' + i + ')').addClass('someClass');
}
};
}
if (eCount > 0) {
ctl.addClass('validationError');
} else {
ctl.removeClass('validationError');
}
if (typeof (val.display) == "string") {
if (val.display == "None") {
return;
}
if (val.display == "Dynamic") {
val.style.display = val.isvalid ? "none" : "inline";
return;
}
}
if ((navigator.userAgent.indexOf("Mac") > -1) &&
(navigator.userAgent.indexOf("MSIE") > -1)) {
val.style.display = "inline";
}
val.style.visibility = val.isvalid ? "hidden" : "visible";
}
|
|
|
|
|
ocmd.CommandText = "update sms_enquiry set status='conformed' where enq_no='" + cmb_enq_no.Text + "'";
ocmd.ExecuteNonQuery();
I am getting ora-01036 oracle exception that is,illegal variable name/number
Plz send me its urgent
|
|
|
|
|
yaswanth001 wrote: Plz send me its urgent
Is it now?
yaswanth001 wrote: I am getting ora-01036 oracle exception that is,illegal variable name/number
Have you even tried Googling[^] for it? It does show quite the positive results.
We are not here to do your work for you. We may help if you try to make it yourself and you fail though, but more than suggestions and the occasional code snippet / article link we don't usually provide.
OTOH, show that you did actually try to fix this yourself and you are almost guaranteed that someone will pitch in and help.
Question downvoted for the obvious reasons
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
Try debugging the source code.
Once you do that, you would be able to try and figure out the error yourself.
|
|
|
|
|
Put a breakpoint on the line ocmd.ExecuteNonQuery(); (an easy way to do this is to put your cursor on that line and press F9). Run your application in debug mode, and wait until it hits that line. Now, take a look at what ocmd.CommandText really says - if I were you, I would inspect this in the Locals Window. Take a copy of that text and try to execute it directly in Oracle.
|
|
|
|
|
I was wondering what you do when you are logging errors and providing error messages during dev, qa, uat and then production. For example, for qa I provide a message to include a guid with their ticket. I provide them the guid. I then use this guid to look up the error message in the log and see what the issue was.
The error messages will change once it goes to production as it will not make sense to ask users to include the guid with their ticket. You simply tell them something went wrong or if they can fix it, tell them what they can do.
The question is:
What is the best practice to use to change error reporting based on qa, uat and production phases?
Here are some ideas I have:
1. I can read from config file for the phase and provide errors accordingly
2. I can have a preprocessor directive defined for each phase
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
I'm not keen on this idea because you aren't testing like for like code (and yes, testing exception handling is testing the code). In other words, each environment is required to behave differently, which means that you cannot be 100% confident that your code will behave correctly as you haven't tested it in the previous environment.
|
|
|
|
|
Point taken! I was looking for more ideas from everyone else and assumed my idea was not the best approach. Can you provide some ideas about how you handle such? I am using Log4Net if that matters.
I am pretty sure I am not the first to come across this.
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
It really depends on what you are hooking into. If you are logging your errors into a database, then you could have a configuration in that database to identify the level of detail to provide, or you could have the actual error message in there. Supposing that the Guid that you display in QA is the identity of the logged error, then your message could be "There was an error logged with id {0}".
Now, if you provide the Guid into this using string.Format and there's no {0} written there then the Guid wouldn't be written out in the error message - satisfying that criteria of not displaying unecessary info to the end user.
|
|
|
|
|
CodingYoshi wrote: 1. I can read from config file for the phase and provide errors accordingly
2. I can have a preprocessor directive defined for each phase
I'd recommend a unified way of phoning home; have every unexpected exception be automatically logged in the bugtracker, and have the bugtracker look up the actual phase of development.
You could add in a conditional compile; adding some complexity that does not add much value to the end-product.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
You could think about using log4net - this will handle a lot of the logging framework for you.
If you want you can turn off debugging logs in the production environment.
|
|
|
|
|
I am using Log4net as I have mentioned. How can I turn off debugging log?
Please note one of the things I am trying to do is providing different error messages to users based on whether the product is in qa or production. In qa the user will be qa. In production it will be, obviously, a regular user.
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
Store your error messages in a database, and read them from there. I wouldn't recommend using resource files for this because it would mean that you have to do a different deploy between the environments.
|
|
|
|
|
Hi,
I am working on a project which involves controling the mediaelement to play videos from the server side. So far, I have no idea at all. I will be grateful if someone can give me a hint. I use visual studio C# as the development tool.
|
|
|
|
|
You need to look into streaming the video. As you haven't said what your client actually is, I can't be any more specific than that - but you now know that one of the keywords to search for in Google is "streaming".
|
|
|
|
|
Thanks so much. I really appreciate you answer.I have learnt something. As I am a newcomer to programming, I think I didn't make my question clear. Actually, I want to make two applications. The first one act as a server which can send a command via the Internet to the second one to request it to play a video. The second application is nothing more than a video player with embeded video files. My question is how do I write a programme which can send a command to the other application to request it to play a video.
|
|
|
|
|
If I were you, I'd look into using Windows Communication Foundation (WCF). This technology is designed to let you write code that can communicate using different transports (HTTP, TCP, etc), with the same code.
|
|
|
|
|
hi guys. i'm really need this .
i have a datagridview with 5 columns . i just attached my datagridview to my table in my access database what i want to do is to convert the first column from string to int , bcz it's saving as string in database and not as int .
the problem is when i hit the column header to sort the data grid viye by the first column is sorting like this .
11
1
2
55
6
7
8
but i want to sort it like this 1-2-6-7-8-11-55
.i think it bcz of the string format of the column do you know any way to convert the column . i think it should be fix if i convert the column from string to int or maybe it'll solve in other way .
|
|
|
|
|
I think (its been a while since I did winforms) you should probably change the underlying data collection. possibly do the conversion way back in the SQL query (assumption).
Never underestimate the power of human stupidity
RAH
|
|
|
|