PikachuSalad's Q&A profile
SQL Server problem with update
Hi Gurus! In a scenrio i want to add one figure in the employeeid column in my table. I just want employeeid+1. And i m applying this query. UPDATE SET employeeid=employeeid+1 WHERE employeeid=111 My Table: employeeid lastname firstname reportsto ----------- ------------------------- ------------------------- ----------- 110 soomro w.a 11 111 Jhonson Tom 12 111 Abe Tom 12 111 Shaprio Tom 12 111 Ali Ahmed 12 111 Ali Adnan 10 (6 row(s) affected) ...Show All
.NET Development Impersonation-Security ADVAPI32.DLL Problem
Im coding the security component for the current RP we are developing in my company, the main problem is that when I use the LogonUser function from this DLL, I can only validate ADMIN users.. i.e. I create the John.Doe user, in the LOCALMACHINE (AdminTools->UserConfig->LocalUsers) and then added it to the Users group. Try the mentioned function in a simple program and it fails... return to the control panel, changed the the permisions of John.Doe to Admin, and the program just seems to work fine... so I supposed that only works with the Admin user or Im missing anything Below is the code for the program and the CLASS USERMANAGER wich ...Show All
Windows Forms Linking the Menu/Toolbar/Tabs and the Statusbar
Maybe I'm just missing the right property, or maybe it doesn't exist, but what I'd like to do is link the Menu and Toolbars to the Status bar so that the status bar will reflect the text value of the menu item or toolstrip button that the mouse is hovering over. In other words, if I move my mouse over the open folder icon in my toolbar, the status bar should read "Open". I'm sure I could link this up the hard way with lots of code, but I was hoping some enterprising soul predicted this need and built in the functionality in the first place. Hi, as far as I know you'll have to do it by code but it's not that much code. J ...Show All
Windows Forms Custom ToolStripItem
Hello, For custom toolstrip items, I want to create a custom one. Can custom toolstrips be user controls Will the toolstrip accept user controls as a custom item Brian Check out this link: http://www.codeproject.com/cs/miscctrl/Office2003ColorPicker.asp Check out the ToolStripColorPicker, it is derived from ToolStripItem and it is a custom control. If you need simple example, let me not. (tell me what control you want on the ToolStripItem). ...Show All
Visual Studio Tools for Office Double-click on Windows Form control opening VBA Editor
If I start with a new VSTO 2005 Document project and in the Designer insert a table, then Windows Form controls into the table (checkbox, for instance), then double-click a control in order to write event code... The first time I do this in a project it opens the Office VBA Editor for Word. I find I need to go over the Events list in the Properties window to create an event for the control. After doing this once in a project, double-clicking any Windows Form control does take me into a procedure for the control's event, as it should. My problem: the document file is now "contaminated"; it will trigger Office macro security. ...Show All
Windows Forms Disabling screen captures to the clipboard
I am creating a windows forms application using VB.NET and want to prevent the users from being able to use Ctrl/Alt/Shift PrintScreen combinations to capture the data displayed on the forms. I found a way to use the ProcessKeyPreview Overrides to insert text onto the clipboard immediately after the screen is captured stating that "screen captures are disabled". But I discovered that by opening any MS Office application, I can use the Office Clipboard to see that screen that was captured still in the clipboard. I have also seen that VB.NET 2005 has the My Computer namespace that allows clearing of the clipboard. But is there ...Show All
SQL Server Change query issues
I am trying to take this statement: Select Total = SUM(gt) FROM (Select Distinct CustomerName, CustomerNumber, FeeGoal_AZ AS FG, FeeSchedule, (cast(FeeGoal_AZ as numeric(30,10)) / FeeSchedule) * 100 AS gt from DCR WHERE branch='00002' group by CustomerName, CustomerNumber, FeeGoal_AZ, FeeSchedule ) as dTable and change up (cast(FeeGoal_AZ as numeric(30,10)) / FeeSchedule) * 100 AS gt I need that part to do this instead there: (PostedAmount + Sum of all PDC where the PDC in this month + Sum all CC where CC in this month) / FeeSchedule) * 100 as gt Here is my failed attempt: ...Show All
SQL Server Creating a publication
hi I was following the walkthrough " Creating a Mobile Application with SQL Server Mobile" and when I got to the point where you create a "local publication" I couldn't find the link "Local Publication" in my Object Explorer. I read all the help in books online however id did not tell me how to bring that link there. I did install the replication component using the CD installation. I have SQL Server 2005 Standard Edition and Visual Studio 2005 I also found the help " Using the Publication Wizard to Create a Publication" but did not know where to locate or start the wizard. any help will be appreciate ...Show All
Visual C++ How to compile use of AVIFileInit
This is undoubtedly something very simple, but I am too new to this environment to figure out what. I have this code: #include <windows.h> #include <vfw.h> #include "stdafx.h" int _tmain( int argc, _TCHAR* argv[]) { AVIFileInit(); // opens AVIFile library AVIFileExit(); // releases AVIFile library return 0; } and I get these compile errors: error C3861: 'AVIFileInit': identifier not found, even with argument-dependent lookup error C3861: 'AVIFileExit': identifier not found, even with argument-dependent lookup What am I missing I can't seem to find any ex ...Show All
Visual Basic Invisible and reinsible a label
How can i onclick a button then visible a label. Then we i reonclick the button the label is invisible. Hi Calvin, In your button_click code you could use the following Me .lblTest1.Visible = Not Me .lblTest1.Visible This would allow you to toggle the Label from being visible to invisible and back as you wish. ie label visible - Click - label invisible - Click - label visible again Regards Nigel ...Show All
Visual Studio Team System Setting command-line arguments for a unit-test project
Hi, I need to perform unit-testing on classes that access the command-line arguments. In order to do that, I need to control the command-Line arguments. Is there a way to do that (and still be able to run all the test automatically) Thank you, Sharon Hi Sharon277, I want to make sure I understand correctly. You have a command-line application with classes in it that refer to arguments they expect to be passed to the application at start, and you want to do unit tests against the methods in those classes The way those classes are instantiated so VS can do unit testing against them is en ...Show All
.NET Development Can't get a TCPClient Connection working
I've been working on this same thing for quite some time now. I'm trying to make an admin console to manage my IRC server, but I can't get past the beginning stages of establishing and maintaining a connection. I finally copied the code out of the project and made a new one with just a textbox, trying to just dump every bit of data I'm sent into that box, but even that isn't doing anything now. I've looked into IRC communication, so I know I'm using the correct syntax. Can someone look at this and tell me why I'm not seeing anything in my textbox In the project I copied this out of, I was getting one messagebox, which was good, but a little ...Show All
Visual C++ How can I handle this error
Dear all , I couldn't handle this error like the code below. I know "strncpy" shouldn't pass the value -1 , but how could I debug this kind of error try { char test[20]; strncpy(test,"123",-1); //problem here -1 } catch(...) { } It also couldn't be handled this after using "SetUnhandledExceptionFilter" api . Could you help me thanks .. ...Show All
SQL Server Get LangId By nchar(1)
Is it possible in SQL 2005 to determine to which language symbol nchar(1) is referred If languages differ greatly, say, like Russian and English, can one write a function, which, under the given alphabet, can determine to what language the symbol belongs If the languages have a similar alphabet, one is faced with the difficulties. For example, it is needed to distinguish characters of American English from those of Australian English or of English from those of any other European language that uses almost the same alphabet. I don’t know how to solve this problem. What can you advise The final task i ...Show All
SQL Server Scheduled Tasks on Windows 2000/2003
I'm trying to use scheduled tasks to copy over transaction logs from one server to another. Can I schedule a task to run hourly I have it set to repeat the task every hour, but it's not working. It does it once and then the next run date is tomorrow. Please let me know if I'm missing something. Thanks Susan Figured it out.. I had the repeat task selected, but had the duration at an hour and a half. Once I modified the duration to 24 hours it worked great!! Thanks Susan ...Show All
