dakota367's Q&A profile
Windows Forms c to vb syntax
what is the meaning of: | and || the y appear in if statement.. one is or, i dont remember what is wat. thanks For Each fi As PropertyInfo In e.GetType().GetProperties() If fi.CanWrite Then If fi.PropertyType.IsValueType Or fi.PropertyType.IsEnum Or fi.PropertyType.Equals( GetType ( String )) Then fi.SetValue(target, fi.GetValue(source, Nothing ), Nothing ) Else Dim value As Object value = fi.GetValue(source, Nothing ) If value Is Nothing Then fi.SetValue(target, Nothing , Nothing ) Else fi.SetValue(target, CloneObject(value), Nothing ) End If End If End If Next ...Show All
Visual Basic sort datagridview
I notice automiatc sort of datagridview only allow sorting one column. I I have a table with columns viewname, code, sequence and values and want to sort by viewname, code and sequence, how do I go about it Do I have to create a virtual column and sort on that Oh, I want the datagridview automatically keeps database source updated. Apparently when I naively add an order by query to the datagridview, changes are longer propagated to the database source. ouch! thank you. I tried to add a query with order by. now changes to datagridview does not propagate back to the origianl sql dataset file. I then had to add somehting like these to allow the datagridview to update the database file Dim ...Show All
SQL Server Client Render broken after upgrade to Win2K3 Enterprise from Standard
First off, any suggestions are welcome here as we're lost. We have a farm of 2 Win2k3 (standard) servers that had a couple GB of RAM. We then installed 16GB of RAM and upgraded to Win2k3 Enterprise to handle the upgrade. Prior to the OS upgrade our reports rendered as expected. Post upgrade, they do not. Some background on how we render...we open a PDF rendering of a report in a popup via JavaScript. Also, we have 3 environments running the same code base. The only difference between the 3 is that one environment is the one we upgraded to Win2k3 Enterprise. Again, any suggestions are much appreciated! Scott Of course, I forgot to add what's probably the biggest key. Only clients have thi ...Show All
Visual Basic Create Dataset and use dataset in coding
Which of the way is more faster: 1) Creating dataset like Dim DS as new System.Data.DataSet or 2) Creating dataset in XML and using it. How to create a dataset in XML and How to use it within our application Regards Mirza If i create a strongly typed dataset which contains the whole schema is that going to affect the performance of the application also i want to use it for the whole application like the pull method and the front end. Can i heavyly load strongly typed with tables. which is the best practice 1) using creating tables visually 2) using xml coding to create them. Or 3) Just dragging and dropping visually from the server explorer and changing according to your needs ...Show All
.NET Development Close sqlserver connection, but using sqlquery commands, hard to explain
I would like to close a sqlserver connection, but using sql query commands. What I need to do is close a connection from a steal user password account. this is the scenario: I made a system where every password can only run one at the time, so you can not run the application in two or more computer using same password. So, if when you try to run the app using your password and the system give you a message error about that another user is already working with same password, you can have the option to close the another user's connection, doing that the system can give you access and only one account(password) should be working at that time. This is because I sold this system base on password's Qty: 1-5, 6-10,... I can not handle this in a t ...Show All
.NET Development TableAdapter missing the update method
Hi all, I am trying to call the update method of my table adapter that was automatically created by dragging the table from data sources view. However, it appears that the update method doesn't exist Only Fill and Getdata. Even on single tables this happens Is there a known bug here. I am currently using VSTO 2005 and excel and it is extremely frustrating! I have followed this code (using my database instead of northwind) and no update method on my tableadapter http://msdn2.microsoft.com/en-us/library/4esb49b4.aspx Cheers Damien I have tried this about 50 times. I have tried with another database in the same project and this table worked ok. The table has a primary key defined and still now ...Show All
SQL Server Changing ASP Application to use SQL Native Client
I am attempting to change an ASP application we've got to use SQL Native Client instead of MDAC and running into a problem. If I use ODBC driver our application runs without problem, but if I try to use the OLEDB provider certain pages are throwing the following error: Item cannot be found in the collection corresponding to the requested name or ordinal. The pages that are not working are using ADODB.Command object to execute a Stored Procedure and populate ADODB.Recordset object. The error is thrown when I try to access a field (by name or index) in the recordset. I am using recordsetname(0) or recordsetname("fieldname") to access the data in the recordset. I have other pages that are working that use this same technique, ...Show All
Visual Basic mapping an onClick event to runtime created menu item
I am trying to create a "recent files" list in a dropdown menu in my application. So I have to add a list of files to a dropdownitemlist when the program loads. I am using the line below to add the a new filename to the list. What I don't know is how to map an onClick event to a newly created object such as the mystripitem below. Any ideas mystripitem = RecentMenuItem.DropDownItems.Add(filename, Nothing, open_recent_event) What sort of menu are you using How is it attached to the control In a VB.NET app in 2003 you'd often use a pre-defined ContextMenu that would be referenced by the ContextMenu property of the control that would display it and in order to populate it you'd set up an event ha ...Show All
Software Development for Windows Vista Workflow monitor from July SDK isn't showing the workflow
No errors just doesn't show the actual workflow in the right pane. Workflows show up fine in the left pane. ...Show All
Visual Studio Express Editions Set Focus
Hello, When I click an element on my form, it doesn't lose it's focus by leave the element. For example: When I select an option in a combobox, and I click beside beside it, the combobox is still focused. I tried Me.Focus() by clicking on the form, but the combobox is still focused. I tried focus the toolbar in my program. Indeed, that focus works correct. After focusing the toolbar, the scrollbar doesn't work with the mousewheel. How can I focus my form Private Sub Form1_Click ( ByVal sender As Object , ByVal e As System . EventArgs ) Handles Me . Click Me . AutoScroll = True Me . HScroll = True Me . HorizontalScroll . Enabled = True Me . VerticalScroll . Enable ...Show All
SQL Server Stored Procedu Is this possible?/How To?
Hi, I'm building a yahoo type messenger. Is it possible within a stored procedure to do the following on the rows found below from a user simon ID(primary key) Username Message New Unread ------- ------- ------- ------ &nbs ...Show All
Visual Basic Compiling C code functions to call from VB
Hi I have a chip I need to reconfigure via a VB app. The company provides a C code API to do this (i.e. their software generates *.c, *.h files for us to call). I don't know C, but I want to compile it as a dll file to reference from my VB project. The files are plain C. Which wizard settings should I use, so that I can compile and link to it to access their functions from my VB code I have tried to do this, but keep getting an error message saying it could not add it as a reference: ...make sure file is accessible, and that it is a valid COM component. Thanks Thanks for the reply - I looked up PInvoke and found information relating to DLLImportAttribute, which looks like it will do the tr ...Show All
Visual Basic Overriding Enum members
How can I override or overload Enum public methods e.g CompareTo or ToString I know that this sounds like wierd.... But this is what I am trying to accompolish... Take an e.g. Enum Numbers One=1 Two=2 Three=3 End Enum What I was trying to do is to override the ToString or the GetName method to return a string other than the enumeration name. Like Dim a as Numbers=Numbers.One Now, I was trying to get something like "Oneself" from the overloaded version of GetName or ToString. I know there could be other methods of achieving the same effect (Collections, or arrays or even classes with Public constants), but I was hell bent on doing it with enums unless I realized that it couldn't be.... ...Show All
Windows Forms Combining ClickOnce and MSI Installer
Hi, I have been surprised by the gap there is between ClickOnce and MSI. And I need to solve this. The scenario is this: Install a windows form application on a client (registry values, files, folder creation) and use ClickOnce to just update the application. Any GOOD documents about it Thanks!!! OK. Let me try to explain: 1.- You will need to create an Installation project (MSI) and finally get your app.msi file. 2.- Need to download the Bootstrapper SDK which contains the Bootstrapper Manifest Generator ( http://www.gotdotnet.com/workspaces/workspace.aspx id=ddb4f08c-7d7c-4f44-a009-ea19fc812545 ) 3.- Now you need to create a Package Manifest. 3.1 – need to add the MSI you just generated. 3.2 – Follow ...Show All
.NET Development Detecting remove lock event on file
I have the following problem: We have to write an application that acts on changes on files. For example editing a word - file. We achieve this using the FileSystemWatcher from .NET 2.0. When the word-file is saved the events correctly trigger, but the files are locked, which causes our action to fail, but this is not the problem. But when the user closes the word-application. The application release the lock,but we can't seem to catch this event so we could run our actions then. Does anybody has as solution Thx, gert So if there is no explicit windows way to detect a lock, we are back to an old-school trial and error approach to find out whether there is a lock ...Show All
