Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > ADO and ADO.NET

ADO and ADO.NET

1-20 of 117     Previous     Next
Determine Whether a Field Exists in an ADODB.Recordset
by Shawn Dorman
Unless you populated a recordset yourself, you may not know whether it contains a particular field.
Quickly Copy Data Rows from DataReader to a DataTable
by Srinath MS
.NET 2.0 provides the new DataTable.Load method to copy data rows from DataReader to a DataTable.
A Faster Way to Search Through a DataTable
by Srinath MS
Find out how DataView can help you perform faster searches through a DataTable.
Use DataTable.Rows.Find() Instead of DataTable.Select()
by Srinath MS
Find out why using DataTable.Rows.Find() is faster than using DataTable.Select() to find records based on a primary key value.
A Quick Way to Copy DataRow
by Navin Varma
Use this code tp copy data in one line from the source to the destination row.
Add a Fresh Set of Records to a Dataset
by Mamta Murthy
When you execute a new query and populate an existing dataset, the newly retrieved records are appended to the existing records in the dataset.
Connect to SQL Server Using ADODB Retrieving Records
by Yatin Karekar
This tip will show you how to connect to SQL Server using ADODB Retrieving Records using Record Set and connecting it to Crystal Reports.
Create and Retrieve a Named DataSet
by Victor Stefanescu
Use this C# function to create and retrieve a named DataSet using an open connection and a command.
How To Add New Rows to a Filtered DataView
by Navin Varma
Find out how to add a new row to a datagrid bound to a dataview with a rowfilter defined.
Retrieving the ID of the last inserted record
by Marco Bellinaso
When you add a new record to a SQL Server table that has an identity column, you usually want to read back the auto-generated ID, for example to use it as a foreign key in another table. If you use stored procedures this is easy to do: just use an output parameter that you set as follows: SET ...
A Fabricated ADO Recordset
by Kamesh S
AddHandlerByName - Attaching to an object an event handler by name
by Francesco Balena
A generic routine that takes an object, an event name, and a list of potential delegates to event handlers, and selects the first delegate that matches the expected signature of the event handler. Example: AddHandlerByName(da, "RowUpdated", _ New OleDbRowUpdatedEventHandler(AddressOf ...
BlobToFile - Saving a BLOB field to a file
by Francesco Balena
Reusable routine that save a BLOB field to a file Requires Imports for System.Data and System.Data.Common Example: BlobToFile(dr, 2, "c:\xxxx.bmp")
CreateConnection - Creating a suitable connection object for a given connection string
by Francesco Balena
Create a suitable connection object for a given connection string. Requires Imports for System.Data, System.Data.Common, System.Data.OleDb, System.Data.SqlClient and System.Data.Odbc Example: Dim cn As IDbConnection = CreateConnection(connStr)
CreateDataAdapter - Creating a DataAdapter for a given connection object, via Reflection
by Francesco Balena
Create a suitable DataAdapter object for a given connection object. Example: Dim da As DbDataAdapter = CreateDataAdapter(cn, "SELECT * FROM Titles")
CreateDataAdapter - Creating a suitable DataAdapter object for a given connection object
by Francesco Balena
Create a suitable DataAdapter object for a given connection object. Requires Imports for System.Data, System.Data.Common, System.Data.OleDb, System.Data.SqlClient, System.Data.Odbc and System.Data.OracleClient Example: Dim da As DbDataAdapter = CreateDataAdapter("SELECT * FROM Titles", cn)
FileToBlob - Loading a file into a SQL Server's BLOB
by Francesco Balena
Reusable routine that loads a file into a SQL Server's BLOB. Requires Imports for System.Data and System.Data.SqlClient (It supports only tables with one key field.) Example: FileToBlob(cn, "pub_info", "logo", "pub_id", "0877", "c:\Example.bmp")
Discovering if the input connection string is for the Oracle managed provider
by Marco Bellinaso
Return a boolean indicating whether the input connection string is for the ADO.NET's Oracle managed provider Examples: Debug.WriteLine(IsOracleProviderConnString("Server=myserver;Uid=myid;Pwd=mypwd;")) ' => True
Discovering if the input connection string is for the SQL Server managed provider
by Marco Bellinaso
Return a boolean indicating whether the input connection string is for the ADO.NET's SQL Server managed provider Note: the function assumes the input string is a valid OLEDB or SQL Server connection string, and it just verifies it does not contain the "Provider" value Examples: Debug.
Extracting the database's name or path from the connection string
by Marco Bellinaso
Return the Database name if the input connection string points to a SQL Server DB, or the DB path if the connection string points to a Jet (Access) DB Examples: Debug.WriteLine(GetDatabaseName("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\MyDB.mdb;")) ' => D:\MyDB.mdb; Debug.
1-20 of 117     Previous     Next
Sitemap