Dharmesh Vora's Q&A profile
.NET Development SQL Question??
I want to set up my button control...so that if my data reader.HasRows then i want it to UPDATE the rows....If my datareader.HasRows is False then i want it to Insert the new information to its new ROW....here is what i came up with any help would be fantastic Private Sub btnSave_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim sqlconn As SqlConnection Dim sqlcmd As SqlComm ...Show All
.NET Development UpdatedRowSource and @@SelectIdentity
Hi, This is my first posting here, so please be patient with me :-) I have an application that uses strongly typed datasets with an Access DB. The Access DB table that I'm referring to here has an ID that auto-numbers when a new row is inserted. The question I have is: My oleDBDataAdapter.InsertCommand's UpdatedRowSource property is set to 'BOTH'. Which to my understanding means that the new row that was created should be mapped back to m ...Show All
.NET Development client side datatable select
Hello, Is there a way to execute sql against a client side datatable object I have a client side datatable object (that was initially populated from backend sql server table) that contains CustId, StateId, CustTypeId. Is there a way to get a list of unique CustIds contained in my client side datatable object - in other words is there something I can do CLIENT SIDE that would equate with select distinct CustId from MyClientSideDatatab ...Show All
Windows Forms List and combo boxes don't show contents
I'm having a bit of trouble with my new Visual Basic .NET software. Just installed it (Version 7.1 blah, blah, blah) and when I debug, my list boxes or combo boxes don't show the contents, whether the contents are added via code or added in the properties window. I've spent far too long today searching for patches, updates and answers, to no avail (although I did discover that MS will provide 1 answer for a "mere" $99.99 -- holy cat!) ...Show All
Visual Basic Problem with Combobox and SelectedValue
Hi again from Spain. I'm working with the beta2 (VB.NET) and i have a problem with a ComboBox and the SelectedValue propertie. I fill a Combo from a database and i use the AutoComplete feature to make easy select a value. But... if i use TAB to enter the Combo... i type the value or select it with the keyboard... and ... then use the TAB to go to the next control (or click with the mouse in other field, button, etc)... the SELECTEDVALUE of th ...Show All
Software Development for Windows Vista Using LUA/UAP in custom applicatons
Hi, The December CTP of Vista has a modified version of UAP/LUA. There's a shield icon (windows colors) next to any setting that requires aleveated status (brings up the verification dialog instead of an earlier dialog that asked for admin password). Also, for other tasks such as opening a file, modifying registry, modifying the drive, etc the dialog pops up asking the user to verify the action. The question being, if I have seve ...Show All
Visual Studio Express Editions Handling SQLException with a DataGridView
I have a bound datagridview that is displaying data from a table with a unique key. If I change an exising value to match another entry and then save I get an SQLexception error. How can I manage this type of error to display a nice dialog message to user I have tried the DataGridView.DataError but this doesnt seem to catch this type of exception (does catch entering a NULL value is this field though ) hi ...Show All
.NET Development Interesting Design Problem.
Ok, so I've created wrapper classes to do what objectspaces was suposed to do but then didn't get released. They wrap the functionality of our database into an API that our application and any third parties want to use too. The problem is that's fine and dandy for ONE item. But when you want to list items there's a design problem. The overhead is huge. I want to be able to pull say the "ID" value and the "Name" value of an item via the API ...Show All
.NET Development publish feature stopped working
2 days ago after months of it working, the publish feature has stopped. Within Visual Studio I get the following in the output window. Error: The publish components are not available. You need to reinstall Visual Studio to publish your application. Well several repair and reinstalls later, the problem remains. So I thought maybe the command line version will give more details on the underlying problem. Target GenerateBootstr ...Show All
Visual Basic Loading and showing a form in a Panel control
Is it possible to load and display a form inside a panel control using Visual Basic 2005 and if so what code do I need to handle this. Regards Dipendra Hi. I don't think it will be possible. I tried to make a panel be the parent of a form and I received a huge exception. It doesn't sound logical to me to do that but as far as I tried it didn't work. What are you trying to do (if we can know of course) Are ...Show All
Visual Basic Passing data between applications
I've searched but cannot find a simple solution for this problem. I am building individual applications in VB.NET (2005) as part of a suite of applications. Each one is a separate project (.exe file) and I want the options of launching a program with optional data being passed to it and data being passed from it. For example, one program performs a lookup in a property database (allowing users to visually search, etc.). The program ...Show All
Visual Studio Team System ASP.Net Unit Test produces 500 Internal Server Error
Hi there, I am running ASP.Net unit tests using IIS (with the HostTpe and UrlToTest attributes). The tests occasionally work but fail most of he time. When I load the page in question manually it loads fine every time. I did find an old web link that talked about this error being caused by the test case inserting and xmlns tag in web.config but it was talking about a beta and didn't have anything about a solution. The test case code was ...Show All
Visual Basic PropertyGrid problems
Hi, I am currently using the propertygrid control to browse an object containing many properties of different types, some being structures which contain properties of their own. The first problem is that when I create a class inheriting from ExpandableTypeConverter, and use this class as the type converter for a property in my base class, I cannot find a way to unbold the display text using the DefaultValue attribute... The second (mor ...Show All
Visual Studio Tools for Office Cypress questions
I read the Cypress announcement and I have some questions. It is unclear to me what functionality will be usable in VS2005 and what will require an upgrade to VS2007. Specifically, I am interested in Word application-level add-in support (like IDTExtensibility2, as opposed to the document-centric approach of the current VSTO) and custom taskbars. I also am interested to know whether any of these features above (and any others) ...Show All
Visual C# Usage of DataView in my custom DataBase Class
I make one database class, in which there is a dataView method. In the aspx file, this method was invoked with the purpose to display the data in database. But here the aspx file failed to display the data, not even the error message in the catch block. Can anybody tell me why cs file: using System; using System.Data; using System.Data.SqlClient; namespace database { public class DBClass { private SqlConnection conn; ...Show All
