swine's Q&A profile
SQL Server What is wrong with my SQL having equals (=) ?
I have a table called "Inc_Exp_Accounts". The table has ledger account numbers and names. It also has a third column called "IsExpense". The IsExpense column is a bit field = 0 (false) if the account is an income account and = -1 (true) if the account is an expense account. I only have income and expense accounts. I do not have other accounts such as asset accounts. The distinguishing thing about income accounts is that the account number (an nvarchar(11) type) is a '3'. Anything else makes it an expense account. I would think I can use the following SQL statement to correctly set the IsExpense column: UPDATE Inc_Exp_Accounts SET IsExpense = IIF(LEFT(Account_Number, 1) = '3', False, True) But nooo, I ...Show All
Windows Forms Trouble handling keypresses.
Hi. I'm having a great deal of trouble handling keypresses. On my Form I have a mixture of standard, overridden and custom controls. I need to direct keypresses and look for hotkeys and stuff, and I also need to explicitly handle down and up events separately. I'm really stuck with this! I want to capture all keys including arrows and tab, and this is proving to be a major sticking point. By implementing event handlers on the form I can capture most events, but not the arrow keys since these are 'control' keys. When I try to do things like override IsInputKey or ProcessDialogKey I get no result. This seems to have something to do with either the use of custom controls, or my Tabcontrol control which seems to hog the arrow key events no ...Show All
Windows Forms Need help selecting rows from datagridview
I would like to show selected datagrid rows on another datagridview on the same form. Basically I have a product table which fills the 1st datagridview. I want users to be able to select multiple products and add them to the 2nd datagridview which is bound to the invoice table. I've been searching to forums and have found some things about this in c# but I'm using vb 2005 express with sql server express. Thanks. Found the answer in another post for anyone who wants to do this. For Each dgvRow As DataGridViewRow In Me .DirectShipLinensDataGridView.SelectedRows Dim dt As DataTable = Me .dataset.Tables( "tablename" ) Dim dtRow As DataRow = d ...Show All
SQL Server Lift chart
Is there a Lift chart viewer like the model viewers that can be embedded within your windows apps If not, then can this be easily created via Adomd.net api calls Has anyone done this easily in custom DM applications Thanks in advance, anil There is not a control that you can embed into your own applications, however you should be able to replicate it's behavior. You can inspect the calls made to ther server by using the SQL Profiler to trace all interactions. Another thing to try is to use the Data Mining Addins, which have a lift chart, to see exactly what calls they make to create the lift chart (this is a bit easier since you can inspect the output directly in Excel). ...Show All
SharePoint Products and Technologies Comments: Employee Training Scheduling and Materials admin template
Hi all, I hope that this post eventually finds its way onto the screen of Sharepoint's development team. I have some general comments about the "Employee Training Scheduling and Materials" admin template for WSS 3.0. First: I really like this template and want to thank those who put it together. Second: I believe it can be improved. So the comments below are constructive criticisms (hopefully) and, well, questions (because it'd be fantastic if any of you can help me make improvements to this template). Comments: 1. There doesn't appear to be an easy method to send email messages to a list of registrants. This would be a desirable feature so that the event organizer could easily send a polite reminde ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Generating More Random Numbers
I'm currently using the following code to generate a random number between 0 and 6: Random random = new Random(); int rand = random.Next(6); It seems to repeat some numbers quite frequently though. What I'm wanting to know is if there's a better way to generate random numbers that seems more... random No computer random number function is truly random . However usually they are sufficient for most uses. The usual problem (besides the one we see here) is that the length of the random number sequence. If you want better read about Mersenne Twisters ...Show All
Software Development for Windows Vista Can I ask UAC for Admin's level when my application already running?
1) As I readed in several articles I can't change UAC level during work of my program. They only way to perform admin's task is to write separate EXE file with special manifest and run it when necessary. Is it right But I see in Vista Task Manager ask for Admin's rights when I click button to shows all processess on PC. 2) I also read that I must places special manifest with ("asInvoker" parameter and etc.) even for usual UAC compatible applications. And in the next Windows they will not start without this section in manifest: " In future releases, the ONLY way to run an application elevated will be to have a signed manifest that identifies the privilege level the application needs. " Why ! It's terrible, because this ...Show All
Windows Forms One or more errors encountered while loading the designer
Hi, I was working on a simple Winforms C# project. I created a few of TableAdapters using the designer and attached them to datagridviews on my form. After realizing that i did not want one of the tables I went to the XSD designer and deleted it. After that the project still excutes ok but the form designer is unable to display the form in design view I get the following error: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Clicking on each error will take you to the line of code that caused it. I am not looking for a response to this problem (creating prototype, kicking the ti ...Show All
Visual J# vjc throwing an exception
I do not have this problem when compiling from VS 2005. This started after I uninstalled the J# redist and then reinstalled it using the MSBuild created bootstrapper program (testing it). When I build using nant which calls devenv to build the solution I get the popup asking me what program I want to use to debug vjc because it hit a problem. Even weirder, the compile continues - it does not return an error. But the rest of the projects are not compiled. What is going on and how do I fix it thanks - dave Ok, now I tried running from nant and got the popup once asking if I wanted to debug the exception in vjc - I said no. It then said the build was successful (which matches VS 2005 in that the exception in the compile d ...Show All
Visual Studio Team System The LinksControl on a Bug work item type
Is there any way to choose the order of the links in the dropdown on the LinksControl control for the Bug work item type By default, it's "Work Item" when you click Add and I would like the default to be "Hyperlink" instead. Thanks! ...Show All
Visual Studio Express Editions idiots code book
hi everyone, i am a beginner to vb as are many who post here, i am putting together a book that explains all code statements and explains how they work and what they are doing better then some of the books i have read. i there is anyone who can submit their error mesages and solutions that will be great, also i will be posting all kinds of command questions as i have already done to others on other posts and i would be gratefull for yoiur explanation comments. i want to start with accept changes why do i use it and wehn dio i use it, what is it for thanks Ok, I've just decided to put my book online. It will take a while though. It's about 150 pages long and I need to convert it to html. ...Show All
Smart Device Development ASP.NET Mobile form in Visual Studio 2005 professional ??
Can anyone let me know how to create a Mobile ASP.NET application, I am using the Visual Studio 2005 This forum is smart device development related. Since your question is not related to smart device development (even though you’re using smart device as dumb terminal for your ASP.Net application), it's off topic here. Please post to ASP forum: http://forums.asp.net/ Closing as off topic. ...Show All
.NET Development how to install sql server based application on different computer
hi, i am new with vb.net and sql server, i have just made an .net vb application with connectivity to sql server. The server was installed on the local machine at the time of development. As now i have build the application, i installed it on a different machine on LAN. but its giving error "The 'SQLNCLI.1' provider is not registered on the local machine." I think something else i need to install to get rid of it. Please suggest how do we make sql server based applications running on LAN connected machines. thanks Nitin The SQL Server Native Client is the runtime components that include the provider that you are trying to use... It is availible as a seperate download fro ...Show All
Visual C++ MSDN Forum Problems
Last week i had some problems in posting my replies to MSDN forums. Yesterday one of my post were automatically posted and even I could not edit or delete it :( What could be wrong I tried with both Firefox and internet explorer to post my answers. I believe this not the problem at my end. Even if error page displayed. some of my answers were already posted to the forums Is there any problem with Forum Servers I noticed this problem for a long time. When I press 'Post' an error message page is displayed, saying that an error occured, but after refreshing the thread's page I see the post published. ...Show All
Windows Forms Updating mulitple tables on the same form
I've got a form with textboxes and comboboxes for Instruments and InstrumentDetails. My dataset has these tables with a data relation/FK constraint which I consider one-to-one (One detailID to One InstrumentID) The child table's ID is set as the primary key, with no auto-incrementing. I've tried setting the datarelation to Relation Only and Relation+FK Constraint. I've successfully made updates to related rows using the .GetChanges method and .Select method in conjunction with the datarelation in my dataset. However, I have ZERO success when it comes to adding records. Since my Instruments table is the parent, I know I must update this one first before adding child table rows related to the new parent record. However, on my form, after ...Show All
