davemord's Q&A profile
.NET Development sorting data in tables
as abv, how can i do it im using sql server express 2005. my situation.. i had retrieved data and sort them before i add them into a combobox. so the problem now is that the ID at the combobox doesnt tally with the ID at the database. the data in the table will continue to increase as time goes.. eg. combobox 0. apple 1.orange 2.pear table 0.orange 1.pear 2.apple i would like to sort the data before i can use the ID for another purpose. SelectedIndex is just the number of the selected item in the listbox. So instead of using selectedindex, use the SelectedItem and cast this to a DataRowView and extract the value, like so: DataSet ds = null; DataTable t = null; private void button2 ...Show All
Windows Forms where can I find out about the combo autocomplete
not much detail on how to use. I want my custom datasource to be the same as what filled the combo box so I should not use a reader but a data table to fill the list as I would have to read through the reader over and over correct ...Show All
SQL Server ERROR using GROUP BY
Hi guys, The code below works fine if I take the "GROUP BY" Sentence out. Without the group by, I am getting something that looks like: Proj Nr Proj Name Proj Nr & Name 001 Proj 1 001 - Proj 1 001 Proj 1 001 - Proj 1 001 Proj 1 001 - Proj 1 002 Proj 2 002 - Proj 2 002 Proj 2 002 - Proj 2 002 Proj 2 002 - Proj 2 And I need only one line for each Proj, like: 001 Proj 1 001 - Proj 1 002 Proj 2 002 - Proj 2 (It is not because of the tables. It is because the Nr "001" is only a substring of the data) I thought I can use GROUP BY in order to get only one line for each Proj. This is the code I am trying: ...Show All
Visual Studio Position dialog based off of toolbar command position
I currently have a command being added to the IDE's toolbar that opens a custom dialog whenever the command is executed. I would like to be able to position the dialog directly below the command button, if possible, but I haven't been able to successfully determine if there is a way to accomplish this. Is anyone familiar with a way to get the location of the command button clicked Our command bar code is based upon the Office command bar code. Unfortunately, they do not support this functionality at this time. The only thing you could do is to use the mouse location to find out where, but that would not work in all situations since the user could use the keyboard. Regards, Craig and Ole ...Show All
Visual Basic visual studio 2005 is running slowly
I am developing a windows application(converting vba to vb.net). some of the forms have ten or more tab controls. Each tab control has many text boxes,listboxes,radio buttons. when i change a name of the control it takes 30s ---2min. when i copy and paste some control from one form to another it takes 1--5minutes. this does not happen all the time. any solution/advice would be appreciated. navigationbar is disabled/wordwrap is disabled ms vs 2005 ver 2.0.50727 os-windows xp sp2 cpu-p4-3000mhz ram-2g machine-hp I tried the hotfix. no luck. still having the same problem 1)changing the name of the controls takes >10-20seconds 2)same symptoms when i save the changes in my projec ...Show All
Visual Studio Team System Working folder confusion???
Hi, I have a team project A set up with a source control tree and one of its projects has a working folder eg. c:\workingfolder. I have team project B setup and created its solution and projects in c:\workingfolder. When I go to add the solution to source control it automatically adds the solution and project files to the source control folder whose working folder is c:\workingfolder in Team Project A. Whats going on with this... surely different projects can share the same working folder. Thanks Donal Hi Adam, Thanks for the quick response - certainly answers why I was seeing what I was seeing. I can give you a very valid example of what I am doing (on an MS product) if you want to t ...Show All
SQL Server Server Time Dimension - Date field isn't parsed in Excel'07
I have a server time dimension that powers all my time related analysis in SSAS 2005. When connecting via Excel 2007 as a client, I've noticed that when the row labels are set to date (i.e. when we're analyzing some measure by date), it's already pre-formatted as a string ("Sunday, December 17 2006") and as such, Excel doesn't seem to be able to do any analysis with it. Is this a known problem w/ the Server Time Dimension Hello. When you build your own time dimension, with a table, you can add named calculations to that table in the data source view. With TSQL DATEPART(mm,MyDate) you can create a MonthNumber dimension and use it on the x-axis in the diagram. Then it is possible to comapre ye ...Show All
Windows Forms HelpProvider relation by topic
Hi, I have question about HelpProvider component. I put it to my form, set HelpNamespace property correctly, determine HelpNavigator of some textbox control as "Topic" and choose HelpKeyword. But it's doesn't work. I try with relation as TopicID: it's work properly. Is it HelpNavigator bug or I don't understand something Note: my .chm help file as it should be contain <topic id="Bla-bla-bla."...> tags. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. how to get input from various keyboards with directinput
First sorry for my bad english... I want to get input from various USB keyboard, and I need to know from which keyboard I get the keystroke, I prove the directinput objects in VB 2005. This are the code that I use in the declaration section (in this case I use 2 USB Keyboard) Implements DirectXEvent8 Private MiDirectX As New DirectX8 Private MiDirectInput As DirectInput8 'the object to my first keyboard Private diDev As DirectInputDevice8 'the object to my second keyboard Private diDev2 As DirectInputDevice8 ' Private keyState As DIKEYBOARDSTATE Private keyState2 As DIKEYBOARDSTATE Private ManejaEvento As Long Private ManejaEvento2 As Long ------------- ...Show All
Windows Forms can i copy two relational records
i have two relational tables in the dataset i need to copy the parent record from the parent table and all the child records belongs to that parent record ... how can i do that thanks in advance. I really do not understand the question. The datarow has a GetChildRows method which gets the child rows from a data relation. ...Show All
Visual C# class has public variable, how NOT to serialize it
I have the following class: class MyClass { public long A; public long B; } I want to serialize this class, but NOT the variable B. I could set B to be private but then I cannot access B from outside the class. Is there a way to tell the XmlSerialization class not to serialize a specific variable class MyClass { public long A; [NonSerialized] public long B; } ...Show All
Windows Forms VS2003, How do you turn on XP Theme at design time?
I'm looking for way to make VS IDE render the form/control being designed using XP theme. I'm not talking about Application.EnableVisualStyles() this renders at runtime. Thanks When you change the theme in desktop->properties->themes, the theme in your vs designer gets automatically changed/updated, if this is what you are looking for... ...Show All
Visual C++ Visual Studio 2005 professional: mspdbsrv failure -> Sporadic fatal error C1033: cannot open program database
I keep getting the following compiler errors, albeit sporadically: fatal error C1033: cannot open program database "D:\somepath\ps_extrude.pdb" It appears as though mspdbsrv.exe is keeping file handles between builds open, causing sharing violations with itself. The compiler is using the /Fd option to specify the pdb file, on a multiprocessor machine using 2 invocations of the compiler at a time. The file access during the error looks like: ------------------------------------------------------------------------------------------ 6:28:20 PM mspdbsrv.exe:3568 OPEN D:\somepath\ps_extrude.pdb SUCCESS Options: Open Access: All 6:28:20 PM mspdbsrv.exe:3568 QUERY INFORMATION D:\somepath\ps_extrude.pdb SUCCESS FileFsVo ...Show All
SQL Server Restoring a DB backUP
Hi, I have a problem. I create a backup from a DB named Prueba (in full mode). But when I try to restore it in a new server the Prueba backup is loaded, and appear a message that said so. But in the DB list next to his name(Prueba) appear a "(Restoring)" ... The DB is not so big (i didnt know why is taking so long or whats the prblem) and i cannot do anything whit it because it doesn t show the tables or any info. Thanks for the help .. I really thanks. Hernan The normal sequence for restoring a database in full recovery mode is to restore the full backup, and then restore the log backups until you reach the desired point in time (or the most recent time). Then the database is recovered (partial transactions are ...Show All
Visual Basic Conversion of Double to Single
I've been fighting with this problem for the past couple days and finally narrowed the problem down to the following couple problems: (This is all in VS 2003 .NET 1.1) #1 I have a Generic procedure that has a ByVal parameter of a Single datatype. In one of my modules, I happen to be calling the procedure passing in a Double datatype variable that has a value of 152347.04. When I step into the procedure, the Single datatype parameter then has a value of 152347.047. I've tried type casting the Double to the Single datatype but still get the same results. I can't figure out why it's not converting over the Double to a Single type by adding some erroneous value to it. #2 Also in the same procedure, I was passing in an ArrayList object that was ...Show All
