Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase

Home >Search > Knowledge Base > C-Sharp > Database
Search:
What's New - What's Hot
Listings for DataSet Object DataSet Object (51)
Listings for SQL Server SQL Server (21)


How to: Add Rows to a DataTable  Version: 0.00     Price: $0.00  
Total Hits: 82  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

To add new records into a dataset, a new data row must be created and added to the DataRow collection (Rows) of a DataTable in the dataset. The following procedures show how to create a new row and insert it into a DataTable. Examples are provided for both typed and untyped datasets....

How to: Insert New Records into a Database  Version: 0.00     Price: $0.00  
Total Hits: 92  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

To insert new records into a database, you can use the TableAdapter.Update method, or one of the TableAdapter's DBDirect methods (specifically the TableAdapter.Insert method). For more information, see TableAdapter Overview.

If your application does not use TableAdapters, you can use command objects to interact and insert new records in your database (for example, SqlCommand)....

How to: Update Records in a Database  Version: 0.00     Price: $0.00  
Total Hits: 52  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

You can use the TableAdapter.Update method to update (edit) records in a database. The TableAdapter.Update method provides several overloads that perform different operations depending on the parameters passed in. It is important to understand the results of calling these different method signatures....

How to: Save Data from an Object to a Database  Version: 0.00     Price: $0.00  
Total Hits: 41  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

You can save data in objects to a database by passing the values from your object to one of the TableAdapter's DBDirect methods (for example, TableAdapter.Insert). For more information, see TableAdapter Overview. To save data from a collection of objects, loop through the collection of objects (for example, a for-next loop) and send the values for each object to the database using one of the TableAdapter's DBDirect methods....

How to: Commit In-Process Edits on Data-Bound Controls Before Saving Data  Version: 0.00     Price: $0.00  
Total Hits: 43  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

When editing values in data-bound controls, users must navigate off the current record to commit the updated value to the underlying data source that the control is bound to. When you drag items from the Data Sources Window onto a form, the first item that you drop generates code into the save button click event of the BindingNavigator. This code calls the EndEdit method of the BindingSource. Therefore, the call to the EndEdit method is generated only for the first BindingSource that is added to...

How to: Drag and Drop Ink     
Total Hits: 141  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

The following example creates an application that enables the user to drag selected strokes from one InkCanvas to the other....

Outlook Drag and Drop in C#     
Total Hits: 285  |  Today: 0Author: David Ewen      Rating:  
Read Reviews | Write Review |  Your Rating: 

A project came up at work the other day requiring the ability to drag and drop any number of mail messages or mail message attachments from outlook into a WinForm application... Easy I thought, this has to be a common problem I will just jump on CodeProject find an example and with a bit of tweaking be running in no time. Now if your here I am sure you now know how little information there is available on this topic so I thought I would add to the very small pool with a complete example of how t...

How to draw a rubber band or focus rectangle in Visual C++ .NET or in Visual C++ 2005     
Total Hits: 216  |  Today: 0Author: Microsoft      Rating:  
Read Reviews | Write Review |  Your Rating: 

A rubber band, or focus rectangle, is a rectangle that tracks with the mouse pointer while you hold the left mouse button. This technique is used to delimit a selection in response to user mouse-pointer input. In the graphics device interface (GDI), these rectangles are implemented by using raster operations (ROPs). However, the System.Drawing method is based on GDI+ (the successor to GDI). GDI+ does not support ROPs. This article describes another approach to implement focus rectangles in the ....

How To Save a DataSet Class as XML in .NET Framework SDK     
Total Hits: 177  |  Today: 0Author: Microsoft      Rating:  
Read Reviews | Write Review |  Your Rating: 

This document illustrates how to save relational data that is loaded into a DataSet class to a file as Extensible Markup Language (XML). This demonstrates the transition between relationally mapped data and XML data....

Export a DataSet to Microsoft Excel without the use of COM objects     
Total Hits: 364  |  Today: 0Author: Xodiak.      Rating:  
Read Reviews | Write Review |  Your Rating: 

This function takes in a DataSet and file name and writes the DataSet to an Excel worksheet. The code is pretty straightforward. Great thing about this function is that, it's technically an XML file that is saved as an XLS file. So it can be used as either file format. No more leading zero truncation on numbers that look like strings. Example, if you made a tab delimited file and put a field such as "00036" (a field that looks like a number but should be regarded as a string), MS Excel would tru...

How to manipulate hierarchical information in flat relational database tables (optionally industrial strength)     
Total Hits: 429  |  Today: 0Author: Akshay Srinivasan2.      Rating:  
Read Reviews | Write Review |  Your Rating: 

A simple table in a relational database is the employees table. This has an employee ID and a reports to ID which is an employee ID. The normal way to fill your tree with this hierarchical information is to query for the root nodes i.e. nodes with no parents in this case null in reports to. Then subsequently query the table for all children of the node i.e. reports to ID equals root employee id. Keep doing this until you come to leaf nodes with empty results. I will describe a better technique t...

Reading and Writing images from SQL Server     
Total Hits: 1071  |  Today: 0Author: ra00l      Rating:  
Read Reviews | Write Review |  Your Rating: 

Today you will learn to write images to SQL Server and then read and display them. In order to follow this tutorial, you will need to have SQL Server, Visual Studio .NET and .NET Framework installed. Ensure that the SQL Server instance is running....

Use BindingManagerBase's EndCurrentEdit() before saving data via an Sql/OleDataAdapter     
Total Hits: 680  |  Today: 0Author: Michael G.      Rating:  
Read Reviews | Write Review |  Your Rating: 

When a user places a cursor on a DataGrid cell in order to edit its contents, the grid is placed into an Edit mode state. If the user later clicks on a save button to commit the changes to a database, the changes may not be saved. This occurs because the DataGrid is still in Edit mode. For this reason, I recommend to all developers that the form, on which the DataGrid resides, be used to end the Edit mode session of the DataGrid. You can do this by issuing it a BindingManagerBase.EndCurrentEdit(...

HOW TO: Create and Use a Typed DataSet by Using Visual C# .NET (Q320714)     
Total Hits: 4920  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article shows you how to create and use a typed DataSet in a small Web application. Typed DataSets, which inherit from the DataSet class, create first-class members of a DataSet's DataTables and DataColumns, yielding the many benefits that come with the use of strong typing....

HOW TO: Read Hierarchical Data into a DataSet in Visual C# .NET (Q318454)     
Total Hits: 2750  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article describes how to load hierarchical data into a DataSet by using the Fill method of the DataSet class....

HOW TO: Reuse the SqlCommand and OleDbCommand Objects in Visual C# .NET (Q317559)     
Total Hits: 1188  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This step-by-step article describes how to reuse the SqlCommand object in your Visual C# .NET code....

HOW TO: Perform a Distributed Transaction with a .NET Provider by Using ServicedComponent (Q316247)     
Total Hits: 878  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This step-by-step article demonstrates how to perform a distributed transaction by using a .NET provider with the ServicedComponent class. Although this article uses the SqlClient .NET provider against a Microsoft SQL Server server, you can also use the ODBC or OLE DB .NET managed provider....

HOW TO: Roll Back Updates in Visual C# .NET (Q316024)     
Total Hits: 609  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article describes how to roll back updates after an error when you use a DataAdapter and a DataSet object....

HOW TO: Quote a Member of the Connection String in ADO.NET by Using Visual C# .NET (Q316367)     
Total Hits: 656  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

Use this step-by-step guide to format a string if there is a quotation mark in a member of the connection string....

HOW TO: Copy a Picture from a Database Directly to a PictureBox Control with Visual C# (Q317701)     
Total Hits: 1385  |  Today: 0Author: MSDN      Rating:  
Read Reviews | Write Review |  Your Rating: 

This step-by-step article describes how to copy an image stored in a database directly into a PictureBox control on a Windows Form without needing to save the image to a file....



Disclaimer - Privacy
© 2002-2012 DevASP.net