Adec's Q&A profile
Windows Forms All I need code example to access DataTable in a dataset. Plz help
Hi, I have dataset and in it DataTable. Below are Quries in DataTable I have a tableadapter and 2 quries -->AppointmentTableAdapter 1- FillMethod = Fill GetMethodName = GetData Commandtext = SELECT ClientID, UserName, Password, LastName, FirstName FROM Appointment ExecuteMethod = Reader 2- GenerateMethods = Get GetMethodName = GetDataBy CommandName = SELECT ClientID, UserName, Password, LastName, FirstName FROM Appointment WHERE (ClientID = @ClientID) ExecuteMode = Reader Parameter = @ClientID I want to access those and bind to DataGrid on button click for SELECT command. Plz help ...Show All
Visual Studio EnvDTE80.TextDocumentKeyPressEvents.BeforeKeyPress functionality
This is my first VS Addin, and I need to trap on keystrokes so I was happy to see TextDocumentKeyPressEvents.BeforeKeyPress in DTE80. The problem is that I need to trap on keystrokes that are not necessarily alphanumeric, which according to my testing within the debugger and the fact that it passes in a string confirms this. So my question is there an event that will handle ALL keystrokes, and not just alphanumerics Thanks P.S. any sample code is appreciated Yes - VSIP allows for much more granularity in terms of extending Visual Studio, than Automation. You can down-load VSIP from http:/ ...Show All
.NET Development Passing properties with attributes to functions
I'm a bit new to attributes and reflection, so hopefully this isn't a stupid question ;-) I have create an custom attribute for properties (AttributeTarget). Next, i've created a class with a property, and on this property i've declared the custom attribute. So far so good. I can read the custom attribute of this property in my class. Yeah! The "trouble" comes with the next set of properties that have this custom attribute. All the properties undergo the same steps that take the custom attribute and create a new class and set one of the values of the new class to the value of the property... The rest of the class is interpreted via the a ...Show All
SQL Server How to delay queue processing?
I am looking for some suggestions on how to implement a delay in processing queue elements. For example, I am using a queue to process requests to call a web service. If the web service is unable to process a particular request, I would like that request to be retried 5 minutes from now while continuing to process other requests that may be in the queue. I suspect I may need additional queues, such as a delay queue. Any ideas would be appreciated. TIA -- Keith. Conversation Timers can be used to do something periodically or to do something after a fixed delay. You can either keep the same dialog you re ...Show All
Visual Studio Unable to debug: The binding handle is invalid
When i try to debug a C# application I get this error: Error while trying to run project: unable to start debugging the binding handle is invalid What can i do Thanks for your answers ZAiNT, Thank you so much for your help. To test native debugging: 1) File->New->Project... 2) Visual C++->Win32 Console Application 3) F10 Thanks, Gregg ...Show All
Smart Device Development How to minimize Win Form to taskbar?
Hi, Can I know how to minimize my win form to taskbar programatically since FormWindowState.Minimize is not supported in .net compact framework I used the Hide() function which actually hide the whole application and remove it from taskbar as well. Any help will appreciate. NOTE: I am developing in WinCE 4.2 environment, which means PPC specific API will not be applicable. Thanks ...Show All
SQL Server Calculating % in Text Box
Hi I'm On the "Layout Tab" and I'm trying to calculate a percentage in a text box. This works: =((Fields!THIS_QTD_LBS.Value - Fields!PREV_QTD_LBS.Value) This Does Not work: =((Fields!THIS_QTD_LBS.Value - Fields!PREV_QTD_LBS.Value) / Fields!PREV_QTD_LBS.Value) * 100 All I get back when I "Preview" the report is "Error" Why It seems like I should also be able to do the following, but cannot: If Fields!THIS_YTD_LBS.Value < Fields!PREV_YTD_LBS.Value =((Fields!THIS_QTD_LBS.Value - Fields!PREV_QTD_LBS.Value) / Fields!PREV_QTD_LBS.Value) * 100 ELSE return zero END T ...Show All
SQL Server A simple calculation ?
I have rows of data in a VB DataGrid with the following fields Product, Price/Unit, # of Units. I want to be able to display these fields plus an extended value to calculate the Price/Unit * # of Units. This seems like it should be easy, I'm just getting a little mixed up with the Syntax. Any help would be appreciated. Thanks in advance tattoo You are writing the syntax yourself. select Product, PricePerUnit, NumberOfUnits, PricePerUnit * NumberOfUnits as TotalPrice from ... ...Show All
.NET Development connections over internet
i have been trying to implement a server and a client little program that will be connecting with each other over the internet. i written the server application to open a port on my computer and listen for tcp connections with tcplistener. the client i used tcp client and gave it to a friend over the net to try and connect to the server on my computer. i gave him my IP address, he putted that in, and the port as well, and tried to connect, but it the tcpclient crashed. it said something along the line the server host refused, something along that line. and that it is not finding the server. im on a switch, and as so as my friend. is the ...Show All
Windows Forms Localizing Tab Control on Windows Form
Hi I am trying to localize a windows c# project and am familiar with the process that Visual Studio uses to do this (Select properties on the form, set localize= true and select a new language...) My problem is that if I have say a tab control with several tab pages with various names then this process does not work - I cannot use this method to localise the tab page names. i.e I cannot seem to select the properiies of the tab control and set the language to e.g. french and then just type in the new translated strings. Can anyone tell me exactly how to do this. Thanks in advance, Cush ...Show All
Software Development for Windows Vista Beta2 - Breakpoints in designer
Hi to all, When I set breakpoints on activities on design surface, they don't get hit (and display circle with exclamation mark during debugging session). However breakpoints in code behind of workflow break just fine. Thanks in advance. Hi, I tried this scenario on the latest version of the WF (not yet released to the users) but could not reproduce the null reference exception. Please try this scenario with the next released version and let us know if you still get the exception. -Sonali ...Show All
Visual Studio Team System Red x on documents folder in team explorer
Hi all, I have TFS beta 3 refresh and every thing is working fine at the client side besides the fact that on some of the machines I cant access the documents folder from the team explorer. I guess it's not a problem of security beacuase this users have the same rights as others which can access the documents folder from the team explorer. It is also possible to access the documents from the share point portal (right clicking on the team project name) and access the "documents and lists" section. I have also tried to copy the http-url ( http://[servername]/sites/[Project ]) to an IE on a client and there the sharepoint sit ...Show All
Windows Forms Forms
Hi everyone! I want to make a new form appear when I click a button on the original form. How could I do this Thanks in advance! Create a Form class that you want to show. Then in the button click event you simply do this: FrmMyForm f = new FrmMyForm(); f.Show(); ...Show All
Windows Forms DataBinding a Treeview
Hi I am just playing about with making a databound treeview and i have got this to work by just passing a datatable to it. My question is, now that i have got this far would it be possible to bind it to a bindingsource or a binding navigator. If so Could you give me any pointers please. I have never worked with the binding source before and haven't a clue but i would like to learn Thanks Mike Pooley Hello Mike I am wanna same thing, my task is like this. I have a table in DataSet which has the elements for my TreeView Control. Now I am using BindingSource between DataSet and TreeView, as there are ...Show All
Visual Basic GUI or Command Line app?
I have a project and since I'm relatively new to the VS.NET environment, I have a very general question. I need advice from experienced developers on whether to create an app as a VB.NET GUI or as just a command line app. Here's basically the high level view: the app will be executed several times a day using Windows Scheduler. The application will query an internal database, then go thru our proxy/firewall and consume an external web service. Once it does the processing in the web service, it will need to terminate. There's no user interaction on this. The credentials, where necessary will be in a config file. Is there any value in creat ...Show All
