|
Hi,
So, specifically what is the debugger setting for the NullReferenceException? Your symptoms suggest that it is currently set to break when the exception is thrown.
Alan.
|
|
|
|
|
I have written a console app in VB.net. Basically it reads some information from a couple Excel files, takes the information contained within and goes to that device on our network to poll for more information. This information is then dumped into a new different Excel file.
I am able to run the application via debug and all works great. I can also run it manually via .exe and all works great.
The problem comes in when i attempt to create a scheduled task (every hour) to run as the System user. My error logging shows that it is not able to access the Excel files (which previously worked when run as admin).
I have tried to troubleshoot by specifically setting the file permissions for that folder/file for the System user.
Could someone shed any light on why I am running into this problem?
Thanks!
-Steve
|
|
|
|
|
a lot of errors like this are caused by account issues - the scheduler usually runs as a particular account - with no standard user environment - so try to fully specify paths etc to the files. Depending on the o/s, you could change the scheduler to use a particular account's credentials - this may throw other scheduled apps out, especially if they require desktop/gui access
The other thing I do is use a 'runas' type program to impersonate the user, including load the registry hive etc, so that the environment is correct - the [in this case 'Excel manipulation program'] is then running under a real user not a limited system account
{ps : I use tqcrunas from a company called 'Quimeras' - Im not affiliated with them in any way, but its a great product that allows me to encrypt/protect credentials/command sets - they are really good at support btw}
'g'
|
|
|
|
|
1. All file paths are absolute.
2. The scheduler for 2008 needs the System account to run scheduled tasks without being logged in as far as I have been able to tell. I have a scheduled task to download a weather map every 10 minutes and would only run using the System account.
3. I attempted to use runas via the command line for the System user however, the password was prompted for, which is not known.
|
|
|
|
|
reply to 3. yep, thats the issue with the standard runas - there are some programs Ive seen that allow you to pass a password to runas
Can you create a seperate user account and test the excel bit under that - if you can use 'runas' and your user account to run the excel bit, then you can use one of the other [encrypted] runas tools I suggest to finish the automation
I still think its your system account vs COM components that EXCEL might be using thats giving you the issue - Ive had the same issue on Windows 2003 server
'g'
|
|
|
|
|
in addition to the tqcrunas product [just to prove Im not biased], Wingnut software also make such a product
http://www.wingnutsoftware.com/[^]
see 'Encrypted runas'
'g'
modified on Sunday, December 27, 2009 9:21 PM
|
|
|
|
|
I have created a query in VB6.0 using MSHFlexGrid. My database is in Microsoft Access 2003. I know how to search the records having a single field (eg:Customer name= "Alex") and get the results displayed in the MSHFlexGrid.
But I need to know how to code a search condition which will display records containing 2 fields (i.e to give 2 parameters to the Condition).eg:How to view the records having Customer name: "Alex" and Sex:"Female". Please, tell me how to do this. I will be deeply grateful for your help!
|
|
|
|
|
|
Hi,
Is it possible to make a from with the thin border like the jumplist one's ?
I searched for it but i found nothing...
Thank you
|
|
|
|
|
You may try to create your own Customcontrol..Or probably the other framework like DevX, Telerik may support this features(I'm not sure)
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Thank you for your answer,Md. Marufuzzaman
A custom form is not the problem, I have already done something similar, but it would be much easier to use the "windows one"...
|
|
|
|
|
You are welcome... Actually it depends on your need..
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Hello,
I have experienced a strange problem which I couldn't find a solution.
I have a form and one dataset with one table. Whenever I make an entry into this table, I have used Seed value as 100 and auto increment seed number as 5. Therefore the 1st record is getting 100 as recordNumber.
I have created another form and placed the same dataset and one combobox which is binded to this table. I have used RecordNumber as ValueMember for the combobox. However when the combobox gets populated with the record, its ValueMember returns 105 instead of 100 (even there is one single record). Whatever I tried to find a solution for the problem, I have had no success. What would cause such problem?
Notice: The dataset table gets filled whenever 2nd form gets loaded.
Regards,
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Is it not something to do with the value returned being the next available number for a new record.
For example if you add a second record to the table (which would take 105) does the 2nd form now return 110?
|
|
|
|
|
I have double checked that whenever I add a new record into dataset gives the correct values as record number (primary key). However, the combobox which I bind to this table doesn't give the right correct values (VALUEMEMBER) when it gets populated from the table.
Second row returns 110 which actually must return 105.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
My exe is not working in other systems pls suggest me
what i have to do for that
|
|
|
|
|
Have you got the correct Runtime installed on the other machines? the most likely problem.
|
|
|
|
|
You're going to have to explain what you mean by "not working". Got any error messages or the circumstances under which it does and does not work?? How about what is supposed to happen and what actually happens??
|
|
|
|
|
Do not give your exe to other systems.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
And the systems will surprised
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
The following code have a runtime error.
Class Test Dim A, B, C as Byte, Sub Main() A=200 B=100 C=A+B Console.WriteLine ( C ) End sub End Clas
Can u tell me why?
modified on Friday, December 25, 2009 8:58 AM
|
|
|
|
|
Hi,
cotdot11111 wrote: What is the output of the messagebox function
Nice one, there isn't a MessageBox around.
in order to determine what a "program" does, you could:
1. read its code and figure it out;
2. actually run it.
[edited after your edit]
cotdot11111 wrote: have a runtime error
what error?
if you want a specific answer, you'd better provide detailed information.
BTW: do you know what "overflow" means? if not, look it up, try Google.
[/edited after your edit]
modified on Friday, December 25, 2009 9:12 AM
|
|
|
|
|
what is the runtime error number/description?
Have you tried to step through the code in debug mode to determine where the exception is triggered.
|
|
|
|
|
A, B and C are all Byte
200+100 > Byte max resulting in an overflow.
|
|
|
|
|
Yeah thank you very much
|
|
|
|