Koni's Q&A profile
Visual Basic What are the differences between a DataAdaper and a DataReader?
When do you use DataAdapter and when do you use Datareader.Please suggest refernce material Paul Domag wrote: Hi, Use an adapter if you want to retrieve files and perform changes in its data. I would say: Use an DataAdapter with a DataSet if you want retrieve records and make changes to them. ...Show All
Windows Forms How undo delete in BindingNavigator ?
Hi! I am using C# and VS 2005. When a user deletes a row using BindingNavigator, it's too late to ask "Are you sure " So, how do I undo the last "delete" Can you show me a code example of allowing "Are you sure " and either performing the delete on true or rolling back the last delete on false Thx, Jess Sorry for bothering everyone, If found this solution at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=148907&SiteID=1 and adapted it to C# after adding my own button to the toolstrip: private void deleteToolStripButton_Click ( object sender, EventArgs e ) { if (Validate() &&a ...Show All
Visual Studio Tools for Office VSTO lab2: Doc.Saved always true
Hello all, I'm a newbie of .NET world and sorry for my english. I'm trying to do the "Lab2: Adding Functionality to Word Document Solutions in Visual Studio .NET 2003" and I have a problem about this code fragment: "Private Sub ThisApplication_DocumentBeforeClose( ByVal Doc As Microsoft.Office.Interop.Word.Document, ByRef Cancel As Boolean ) Handles ThisApplication.DocumentBeforeClose If Doc Is ThisDocument And Doc.Type = _ Word.WdDocumentType.wdTypeDocument Then If Doc.Saved Then ' the document is already saved; allow the document ' to close without prompting the user ..... Else .. ...Show All
Windows Forms Refreshing ListBox strings
I have a collection of objects. Each object has a list of email addresses. I then have two ListBox controls: The first for displaying the objects and the second for displaying the email addresses of the selected object in the first box. The objects are added to the first list box with .Items.Add() and the object has a .ToString() method which displays the name of the object with the amount of addresses it contains. (i.e. "Some Group (42)") When an object is selected, the second ListBox is cleared and then each email address that belongs to the selected object is added via .Items.Add(). The Problem (finally): When I add or r ...Show All
SQL Server use multiple databases as source for report builder
I have table's in multiple databases. I am trying to access them in the report builder. I tried view's but it doesn't display them. any Idea's. You need to open model designer, open the DSV based on views and for all views define PK/FK columns. This is require by model generation wizard - otherwise it can not generate entities and roles. ...Show All
.NET Development Class Library Protection
How could I protect my DLLs, so that others could not make reference to my DLLs Such like what happened when you directly reference the OE DLLs... Thanks for any advances. You can add a password parameter, but even then, people can disassemble your .NET code and read it, so really there is no protection at all. Obsfucators will help, but the only real solution is to write your code in normal C++. ...Show All
Windows Forms Listview Sorting!
I did a simple sorting on listview. The problem i faced is the inaccuracy of the sorted result or i might have taken the wrong apporach. For example, I have a listview result of Dennis 4 Daniel 7 Steven 6 campy 11 If i sort it using ascending methods based on the Integer value. The reuslt should be:- Dennis 4 Stev ...Show All
Visual Studio Tools for Office Creating tab delimited text files form excel using vba
I wanted to know how to create text files that get populated from specific ranges of cells from excel An example that I am looking for is to create a header and a line tab delimited text file. The header file would only have one row of data. The line text file could have one row of data or it could have 100 rows. I want to be able to export the data from the spreadsheet and have it create two different text files. One for the header reacord and one for the line record. If someone can point me in the right direction on how to do this in excel using vba Thank you This forum is mainly for issues tha ...Show All
Windows Forms How can Implement a string Collection Editor in a property Grid
Hi I have done some reserch how to implement the above,however I get lost in more complex examples I have found in codeproject and so on. What I want to do is when showing my propertyGrid I want to have the ability to have a collection editor of strings. For example sake lets say I want to have a collection of car Models. THe problem i have is that i see the collection editor but when I press Add I get "Constructor on type system.string not found" AM I missing something If so could somebody show me with a bit of code Thanks in advance for any suggestions. I have done as follows: '//Collection class #Region "Imports Directives" I ...Show All
Smart Device Development SQL Query Tool
Are there any tools that I can run sql queries against my server's database via my windows mobile device Yes for SQL Mobile and SQL CE (Query Analyzer tool), no for any other database. ...Show All
Visual Studio 2008 (Pre-release) BehaviorExtensionSection for Web Service
Hi there, I have web service i want to implement Behaviour Extension for it. How to do it. I have created three classes Following are its brief details 1. CustomBehaviorSection : BehaviorExtensionSection protected override object CreateBehavior() { return new CustomBehavior (); } 2. CustomBehavior : IEndpointBehavior , IServiceBehavior //IEndpointBehavior Members public void ApplyDispatchBehavior( ServiceEndpoint serviceEndpoint, System.ServiceModel. EndpointDispatcher endpointDispatcher) { endpointDispatcher.DispatchRuntime.MessageInspectors.Add( new CustomMessageInspector ()); } //IServic ...Show All
.NET Development Async sockets, receive callback problem
Hi, I'm writing an async socket server that transport custom serialized objects. However, I ran into a problem when sending a lot of messages in a loop from the server to the client. To simplify matters I shortened my test code: Here I'm sending some data to the client... for ( int i = 0; i < 100; i++) { state.WorkSocket.BeginSend(b, 0, b.Length, SocketFlags.None, sendCallback, state); } The client receives the data and processes it: StateObject state = (StateObject)ar.AsyncState; &nb ...Show All
Visual Studio Express Editions VISUAL BASIC 2005 EXPRESS EDITION
HELLO WORLD, I just brought what i thought was visubasic 2005 express edition for amzon.com. when i open the box it came with 3 cd's inside... 1:visual basic 2005 express edition. 2:visual studio 2005 express edition getting started. and 3:visual studio 2005 express editions corbis image disc. and 1 book "microsoft visual basic 2005 express edition: build a program now! the problem is that when i put the visual basic 2005 disk in everything went well excpet that "visual stuio express edition" was installed and not visual basic 2005 express edition. i had no beta copies on my drive i even formated my drive and tried a clean ...Show All
Visual Studio Team System VB: Edit and Continue
I have a problem with Visual Basics Edit & Continue for projects under Team Foundation server, the IDE says its Read-Only even if its checked out prior to debug start. In a non-source-controlled environment it works. You even see the little "lock" symbol on the tab-page with the source code in the IDE on the file you are current trying to edit, so clearly the IDE thinks its locked. Any ideas found it, it was some project settings that hanged on because it was a converted 2003 project, changed that to "default" and it works. ...Show All
Visual C# drawing something to the form---
how can i draw a line or circle on my form an example will be welcome! Thanks A Lot Depending on why you want to draw on the form, you can chose which suits your needs. Options A: Use the forms Paint event, to draw the graphics everytime the form is painted... private void Form1_Paint( object sender, PaintEventArgs e) { Graphics G = e.Graphics; G.DrawLine( new Pen ( Color .Black), new Point (25, 25), new Point (125, 25)); G.Dispose(); } Options B: Use the forms CreateGraphics method, which will draw on the form, but not persist once its repainted... private void DrawOnForm() { ...Show All
