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 - Page 3

41-60 of 117     Previous     Next
Determine how many records the DataReader is about to return
by Francesco Balena
The DataReader is the ADO.NET counterpart of the forward-only, read-only recordset in classic ADO. For this reason you never know how many rows the DataReader is about to return. In most cases you don't need this information, because you tipically process each row as soon as it is being ...
CreateDataAdapter_OleDb - Create an initialized OLEDB Data Adapter
by Francesco Balena
create and return a DataAdapter over an open OleDbConnection and initialize its delete, insert, and update commands CN is the OleDbConnection object SQL is the SQL Select statement to be executed any exception is thrown to the caller
CreateDataAdapter_Sql - Create an initialized SQL DataAdapter
by Francesco Balena
create and return a DataAdapter over an open SqlConnection and initialize its delete, insert, and update commands CN is the SqlConnection object SQL is the SQL Select statement to be executed any exception is thrown to the caller
CreateDataReader - Create a DataReader over any connection
by Francesco Balena
return a DataReader over a generic Connection CN is the OleDbConnect or SqlConnection object SQL is the SQL Select statement to be executed if closed, the connection will be opened and then closed on exit any exception is returned to the caller
CreateDataReader_OleDb - Create an OLEDB Data Reader
by Francesco Balena
return a DataReader over an OleDbConnection CONNSTRING is the connection string SQL is the SQL Select statement to be executed the connection will be automatically closed when the DataReader is disposed any exception is returned to the caller
CreateDataReader_Sql - Create a SqlClient Data Reader
by Francesco Balena
return a DataReader over a SqlConnection CONNSTRING is the connection string SQL is the SQL Select statement to be executed the connection will be automatically closed when the DataReader is disposed any exception is returned to the caller
UpdateDataAdapter - Update a data source through a DataAdapter
by Francesco Balena
update a data source through a DataAdapter DA is the OleDbDataAdapter or SqlDataAdapter object DT is the DataTable to be updated if USETRANSACTIONS is True, all rows are updated, or none returns the number of affected records or -1 if the update failed
Saving an array to a SQL Server table with VB and ADO
by Francesco Balena
Persisting an array of data in a SQL Server DB is usually considered quite difficult. The common solution is to use a master detail table, but this leads to a waste of space and overall decreases performance. Here we'll see how to save an array with VB and ADO. Create the destination table ...
A dual use of a lookup query
by Vito Vessia
Usually in your application you use two different types of lookup query; the first one is for retrieving a page of records (or all records) to populate a pick list, the other one is to retrieve a single record, i.e. for decoding a code description while user is typing it in a textbox. So, if ...
Close the DataReader before changing database
by Francesco Balena
The ChangeDatabase method of the ADO.NET Connection object requires an open connection to execute correctly. Even if the connection is open, you can still have an InvalidOperationException when invoking this method; this happens when you are reading data from the connection by means of a ...
MDAC 2.6 is required for .NET applications
by Francesco Balena
All ADO.NET applications require MDAC 2.6 or later (MDAC 2.7 is recommended). MDAC 2.7 comes with Visual Studio .NET but no MDAC version is included in the Microsoft .NET Framework SDK and the .NET Framework redistributable package. If your .NET application attempts to open a connection without ...
CUDL - A class to create UDL files
by Gordon Gong
A class that creates UDL files for use as ADO Data Sources. Universal Data link files are handy for select data sources but there are lack of a way to create/edit this files. The little program i attached teaches how to read/write a UDL file. IMPORTANT: requires that you add a reference to ...
Read and Write UDL files
by Gordon Gong
Universal Data link files are handy for select data sources but there isn't a way to create/edit this files. This little class shows how to read/write a UDL file. '----------------------- ' The cUDL Class '----------------------- 'please visit www.shoutsoft.com for Tools building ...
Close Connections When You Are Finished With Them
by Trong Ha
By proactively closing connections when they are no longer needed, you reduce demand on the database server and make resources available to other users. Connections are closed when they go out of ...
Increase Connection Throughput By Requesting Multiple Records At Once
by Trong Ha
By default, the CacheSize property of the Recordset object is set to 1 for all cursor types. By increasing the CacheSize, you can increase the number of records the provider will retrieve at one ...
BlobToFile - Copy a BLOB field's contents to a binary file
by Francesco Balena
Copy a BLOB field's contents to a binary file.
CloneFieldStructure - Create a new Recordset with same field structure
by Francesco Balena
Copy the field structure of a Recordset to a new Recordset. The original code has been improved to account for Numeric and Decimal fields, that also require the setting of Precision and Numeric Scale properties. Thanks to Robert Gelb for this suggestion.
Create UDL files the easy way
by Scott Hutchinson
The standard way to create a UDL file is to right-click in the directory where you want to create it and select the New-Microsoft Data Link menu command. Unfortunately, on many computers, this manual procedure won't work, because the file type "Microsoft Data Link" does not appear on the "New" ...
FileToBlob - Copy a file's contents into a BLOB field
by Francesco Balena
Copy a file's contents into a BLOB field.
Use adExecuteNoRecords in the ADO Command Object to Boost Performance
by Andrew Holliday
If you need to execute a stored procedure from a Command object, and the stored procedure will not return any rows, you can boost performance of the Command object by setting the ...
41-60 of 117     Previous     Next
Sitemap