|
I have never touched this feature before this started happening.
All of the sudden this started happening a month ago. I was writing a small script then so I just took the debug executable and used it, chalking it up to a fluke but now it is happening on this next application and I can't seem to fix it. I also created a brand new application windows form and added a single button that popped up a message box. I tried to publish this and I'm getting the same error.
Can you tell me how I can check for what you've stated might be happening?
|
|
|
|
|
That sounds great everyone, I will use a listbox instead and report back.
Thank you for the help.
|
|
|
|
|
No problem. Glad to help.
|
|
|
|
|
Hi All,
I am wondering if the correct way to handle installing third party drivers is to call
them. I need to use a Microchip driver and would like to know if it's good practice (what might I break) to install the driver from the windows installer (using a script) with out checking if it already has been installed or install it every time it is installed?
Glenn
|
|
|
|
|
glennPattonWork wrote: if it's good practice (what might I break) to install the driver from the
windows installer (using a script) with out checking if it already has been
installed or install it every time it is installed?
No. Your installer should account for the fact that a later version of the driver might have been installed. You could well break other parts of their system if your application just blindly installs the older driver.
|
|
|
|
|
That is what I'm afraid of doing (I am a small part of a huge project). I just don't want to appear completely amateur when my part does not work due to the wrong driver being installed. Is there a way of checking if the driver has been added to usbser.sys with out causing problems? I am at a loss, how do I go about checking the value I have looked over MSDN but they seem to be overly interested in Win 8 or CE5?
Glenn
modified 28-Jun-12 11:03am.
|
|
|
|
|
You could add a custom step in your installer and execute the following code to find the driver:
public static Dictionary<string, string> GetDriverInfo(string driverName)
{
Dictionary<string, string> driver = new Dictionary<string, string>();
System.Management.SelectQuery query = new System.Management.SelectQuery("Win32_SystemDriver");
query.Condition = string.Format("Name='{0}'", driverName);
System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(query);
System.Management.ManagementObject manageObject = searcher.Get();
if (manageObject != null)
{
driver.Add("PathName", manageObject["PathName"]);
driver.Add("Description", manageObject["Description"]);
driver.Add("State", manageObject["State"]);
driver.Add("StartMode", manageObject["StartMode"]);
}
return driver;
}
|
|
|
|
|
Thanks for that I will have to give it ago, looks like the huge Friday task is off tomorrow, I will have to get playing with that Thanks again!
|
|
|
|
|
No problem. Glad we can help.
|
|
|
|
|
Sorry to reopen this can O worms, but I have been playing (dangerous I know!) and am now
can you tell me where to put the code you suggested yesterday (also can you point me to source about deployment other than the one I am using Wrox's Effective Visual Studio .NET (written and tested for the final release of .NET 1.0), the spine is now yellow from sitting on a book shelf in the Sun for a long time!)
Glenn (sorry!)
modified 29-Jun-12 7:24am.
|
|
|
|
|
Quickly, I have been playing (Days like this are vital, you discover so many things!) and found the Setup Wizard, I have always avoided it (I tend to avoid things like that in MS project as Clippy springs to mind), I must say I found it not a million miles different from the VB6 installer....
|
|
|
|
|
Hi,
I need to explain this abit....
I am using MySQL awith C# to develop Windows Form application..
I have the following tables:
CREATE TABLE `salary_slip_category` (
`salary_slip_category_id` int(11) NOT NULL AUTO_INCREMENT,
`salary_slip_category_name` varchar(255) DEFAULT NULL,
`salary_slip_category_plus_or_minus` varchar(1) DEFAULT NULL,
`salary_slip_category_default_description` varchar(255) DEFAULT NULL,
`salary_slip_category_order` int(11) DEFAULT NULL,
PRIMARY KEY (`salary_slip_category_id`),
KEY `idx_salary_slip_category_salary_slip_category_name` (`salary_slip_category_name`),
KEY `idx_salary_slip_category_salary_slip_category_plus_or_minus` (`salary_slip_category_plus_or_minus`),
KEY `idx_salary_slip_category_salary_slip_category_default_descriptio` (`salary_slip_category_default_description`),
KEY `idx_salary_slip_category_salary_slip_category_order` (`salary_slip_category_order`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
CREATE TABLE `salary_slip_details` (
`salary_slip_details_id` int(11) NOT NULL AUTO_INCREMENT,
`employee_number` int(11) DEFAULT NULL,
`is_benefit` bit(1) DEFAULT b'0',
`salary_slip_details_order` int(11) DEFAULT '999',
`trxn_code` varchar(50) DEFAULT NULL,
`salary_slip_id` int(11) DEFAULT NULL,
`salary_slip_code` int(11) DEFAULT NULL,
`salary_slip_month` int(11) DEFAULT NULL,
`salary_slip_year` int(11) DEFAULT NULL,
`salary_slip_details_category` varchar(255) DEFAULT NULL,
`salary_slip_category_plus_or_minus` varchar(1) DEFAULT NULL,
`salary_slip_details_description` varchar(255) DEFAULT NULL,
`salary_slip_details_amount` double(10,3) DEFAULT NULL,
`salary_slip_details_released` bit(1) DEFAULT b'0',
PRIMARY KEY (`salary_slip_details_id`),
KEY `idx_salary_slip_details_employee_number` (`employee_number`),
KEY `idx_salary_slip_details_is_benefit` (`is_benefit`),
KEY `idx_salary_slip_details_salary_slip_details_order` (`salary_slip_details_order`),
KEY `idx_salary_slip_details_trxn_code` (`trxn_code`),
KEY `idx_salary_slip_details_salary_slip_id` (`salary_slip_id`),
KEY `idx_salary_slip_details_salary_slip_code` (`salary_slip_code`),
KEY `idx_salary_slip_details_salary_slip_month` (`salary_slip_month`),
KEY `idx_salary_slip_details_salary_slip_year` (`salary_slip_year`),
KEY `idx_salary_slip_details_salary_slip_details_category` (`salary_slip_details_category`),
KEY `idx_salary_slip_details_salary_slip_category_plus_or_minus` (`salary_slip_category_plus_or_minus`),
KEY `idx_salary_slip_details_salary_slip_details_description` (`salary_slip_details_description`),
KEY `idx_salary_slip_details_salary_slip_details_amount` (`salary_slip_details_amount`),
KEY `idx_salary_slip_details_salary_slip_details_released` (`salary_slip_details_released`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8;
CREATE TABLE `employee` (
`employee_number` int(11) NOT NULL AUTO_INCREMENT,
`id_number` varchar(255) DEFAULT NULL,
`employee_name` varchar(255) DEFAULT NULL,
`employee_gender` varchar(11) DEFAULT NULL,
`employee_designation` varchar(255) DEFAULT NULL,
`date_of_birth` date DEFAULT NULL,
`employee_email` varchar(255) DEFAULT NULL,
`employee_mobile` varchar(255) DEFAULT NULL,
`employee_home_tel` varchar(255) DEFAULT NULL,
`date_of_join` date DEFAULT NULL,
`last_working_date` date DEFAULT NULL,
`bank_name` varchar(255) DEFAULT NULL,
`bank_account` varchar(50) DEFAULT NULL,
`current_employee` bit(1) DEFAULT b'1',
`is_active` bit(1) DEFAULT b'1',
`login_password` varchar(255) DEFAULT NULL,
`login_pin` varchar(4) DEFAULT NULL,
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`employee_number`),
KEY `idx_employee_id_number` (`id_number`),
KEY `idx_employee_employee_name` (`employee_name`),
KEY `idx_employee_employee_gender` (`employee_gender`),
KEY `idx_employee_employee_designation` (`employee_designation`),
KEY `idx_employee_date_of_birth` (`date_of_birth`),
KEY `idx_employee_employee_email` (`employee_email`),
KEY `idx_employee_employee_mobile` (`employee_mobile`),
KEY `idx_employee_employee_home_tel` (`employee_home_tel`),
KEY `idx_employee_date_of_join` (`date_of_join`),
KEY `idx_employee_last_working_date` (`last_working_date`),
KEY `idx_employee_bank_name` (`bank_name`),
KEY `idx_employee_bank_account` (`bank_account`),
KEY `idx_employee_current_employee` (`current_employee`),
KEY `idx_employee_s_active` (`is_active`),
KEY `idx_employee_login_password` (`login_password`),
KEY `idx_employee_login_pin` (`login_pin`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
I am using the salary_slip_details to view the salary details, linking it with employee_number in the employee table and also linking it to the salary_slip_category to view it by category
I want to know how can I make the result showing like this:
1. every employee will have one row.
2. Categories will be shown as columns and total amount of the category will be shown there
so if the employee has 2 record of decution (category) 10 dollar each the in the deduction column it will show 20$ for that employee
kindly help....
|
|
|
|
|
Try something and if you face issues with your code, kindly post your code here.
No one is going to write a program for you.
|
|
|
|
|
oh I am sorry! I only speak English..
You can try http://translate.google.com[^] if you didn't understand my post
My post was how to do it NOT PLEASE WRITE A CODE FOR ME!!
Hope it's clear now...
|
|
|
|
|
This really should have been posted in the database forum because it's really about the retrieval of the data. If I were you (and this is a big hint on how to get the data into one row), I would read the links on this[^] page, paying particular attention to the Pivot section. Just saying, that's all.
|
|
|
|
|
I understand that it is possible for a link in MS Excel to open another MS Excel using OpenXML SDK. Need to create Hyperlinks object and append it to Worksheet object. Now would like to know how we can manage authentication of the new document that is opened.
For Example: In web application, say one doc is already downloaded from server to browser, and user clicks on a link in that document which connects to another doc in the server.
How this clicking on link request will be authenticated? Will that be taken care by browser or should we create a new session cookie for that and authenticate? In OpenXML is there anyway if this can be managed easily without the end user knowing how this takes place.
Please share your thoughts on the request. Thanks alot for your help!
Regards, Rijesh
|
|
|
|
|
|
thanks, I have moved the post to the .Net discussion board..
|
|
|
|
|
I am in the the process of building an iphone app that would access MSSQL database through a RESTful WCF. At the heart of my iphone app, customer will plug their info, take a pic, maybe audio file and small txt file along with some other simple info to update database. I was thinking, I would bundle all that up in some object and post it via HTTP into WCF, which then updates the db.
I have some doubts about this as WCF expects One Stream parameter, and nothing else along in same method, So Stream parameter can't be part of the object.
I would like to deal with JSON. Does anyone have an idea of what's the best way to do this? Note, I am able to post txt file, Stream Image file as seperate methods at the moment. I am hoping to bundle that up and make one post request to get that done.
Thanks
|
|
|
|
|
This does not appear to be anything to do with C#; perhaps you would be better posting in the WCF, Mobile or Collaboration forums.
|
|
|
|
|
I posted this on WCF. How do I remove this out of here?
|
|
|
|
|
You cannot remove it, but you can edit the original (and add the word "Solved" to the title) and mention that it has been moved.
|
|
|
|
|
Hello,
I'm having a problem where an exception is thrown while trying to download files, using the Tamir.SharpSSH library, if the files don't exist. It's expected behavior, however, after the exception is thrown I'm unable to close the connection because I lose scope. I'm sure there is a simple solution. I would appreciate any help. The code is currently...
try
{
Sftp sftp = new Sftp(sftpServer, sftpUserName);
sftp.Password = sftpPassword;
sftp.OnTransferProgress += new FileTransferEvent(sftp_OnTransferProgress);
sftp.OnTransferStart += new FileTransferEvent(sftp_OnTransferStart);
sftp.Connect(22);
if (sftp.Connected)
{
DateTime now = DateTime.Now;
string year = now.Year.ToString();
string month = now.Month.ToString();
if (month.Length < 2) { month = "0" + month; }
Log("Attempting to download all files from todalton directory for the current month");
sftp.Get("balance//todalton//daltonAutoload" + year + month + "*", @"C:\higherone\");
Log("Transfer Complete");
}
}
catch (Tamir.SharpSsh.jsch.SftpException)
{
Log("No files of the given criteria exist on the server.\r\n\t\tDownload aborted."
+ "\r\n\t :NOTE: If this is the first run of the month, this is the expected behavior.");
}
catch (Exception ex)
{
Log(ex.Message + " :NOTE: sftp connection failed during download");
}
finally
{
sftp.Close();
}
I can't reach the Close method from within finally or either catch. Originally the close was where it is commented. Obviously the exception causes that line to be missed though.
Thanks
|
|
|
|
|
I can't see how your code even compiles. You declare sftp inside your try block, which is means that it shouldn't be available in your finally block. This leads me to think that you have declared a member called sftp as well.
|
|
|
|
|
The obvious solution is to give sftp a wider scope, maybe like so:
Sftp sftp;
try {
sftp=new Sftp(...);
...
} catch (...) {
...
} finally {
if (sftp!=null) sftp.Close();
}
The better approach, if the class implements IDisposable() and relying on the assumption that a call to Dispose() also closes the connection, would be based on the using statement:
try {
using(Sftp sftp=new Sftp(...)) {
...
}
} catch(...) {
...
}
Now in whatever way you leave the using block (short of killing the process!) sftp.Dispose() will be called automatically, even when an exception gets thrown.
|
|
|
|
|