Login | Register   
LinkedIn
Google+
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

ADO - Page 2

21-40 of 72     Previous     Next
Build an XML Document for a Recordset on the Fly
by Venkat Alladi
(Note: This tip assumes that you have an ...
RecordCount Property-ADO
by DevX Pro
How do I get the rowseffected from the execute method of an ADO command object? The code I've written is: Dim Cn as New ADODB.Connection Dim Cmd as New ADODB.Command Dim Recordset as New ADODB.Recordset Dim lintRecEffected As Integer Cn.Open "some connection string" Cmd.ActiveConnection =Cn Cmd.CommandType=adCmdStoredProc Cmd.CommandText = "SelecRecords: Set Rs=lcmd.ExecutelintRecEffected) msgbox lintreceffected This shows -1 even though the record is inserted. By the way, my backend is db2.
Dealing with Multi-Recordsets Returned by Compound SQL Statements
by Ning Hao
Everyone can deal with one recordset easily. However, if a SQL statement is like this: "SELECT a, b FROM Table1 COMPUTER SUM(a), SUM(b)," looping though the recordset will not return the aggregate ...
The hidden Collect method of the Recordset object
by Francesco Balena
The ADO Recorset object exposes a hidden, undocumented member: the Collect property. This property is functionally similar to the Field's Value property, but it's faster because it doesn't need a reference (explicit or implicit) to the Field object. You can use this property by passing a ...
Use ADO "Prompt" Property to Allow the User to Initialize the Provider
by Jai Bardhan
Prompt is a dynamic property that OLE DB providers can use to allow the user to input customized initialization information, typically through a dialog box. The OLE DB provider may append this ...
Counting the Number of Records in
a Recordset
by Jai Bardhan
Editor's Note: This tip is an update to a previous Tip of the Day. Jai Bardhan claims to have a "better ...
Export to a text file with quoted fields
by Francesco Balena
As explained in another item in this Tip Bank, you can use the Recordset's GetString method to export a Recordset to a comma-delimited or tab-delimited text file. However, if you are exporting string fields that might include commas or tabs, you should include the fields' value within quotes. ...
Export to a text file with the GetString method
by Francesco Balena
The GetString method of the Recordset object returns a formatted string that contains all the values in each field and each row in the recordset, with your choice of column and row delimited. You can therefore use it to quickly and easily export the recordset to a comma-delimited text file, for ...
Faster client-side ADO 2.1 Recordset with the OPTMIZE dynamic property
by Francesco Balena
ADO 2.1 added a new, important dynamic property to the Field object, the OPTIMIZE property. If you have a client-side Recordset and you set this property to True, ADO will create an Index for the specified field, and will then automaticaly use that index for any Find, Sort, and Filter ...
Adding a New Record to ADO
by DevX Pro
I know there are two ways to insert a new record. One way is to execute a Insert statement, the other way is use the recordset.AddNew method. In terms of performance, which one is better? When dealing with the memo field, which may contain single quotes or double quotes, is AddNew method the only way to go?
Searching with Multiple Fields
by DevX Pro
I am developing a s/w with an Access database, using ADO. Now, I want to search a table with multiple columns. As in find method (ADO), it allows only one column to search. How do I search a record with a multiple column search?
Create explicit Field objects when looping on large Recordsets
by Francesco Balena
Whenever you access a database field through the Recordset object you incur in a slight overhead. Take for example the following code snippet: Dim rs As New ADODB.Recordset rs.Open "SELECT au_lname, au_fname FROM authors", "DSN=pubs", , , adCmdText Do Until rs.EOF List1.
ADO Events
by DevX Pro
How do I use the ADO events FetchProgress or FetchComplete?
ADO Connection String
by DevX Pro
What is the syntax for accessing a FoxPro 2.5 table using an ADO connectionstring? I want to be able use a DSN-less connection and access different tables depending on the user request.
Take Advantage of ADO Optimizations
by Jai Bardhan
A common user scenario in a development environment is where the code typically opens a connection, executes a row or non-row returning command, processes results, and closes the connection. For such ...
Improve Scaling of ADO Apps By Marking ADO As an Apartment Model in the Registry
by Jai Bardhan
ADO 2.0 includes few optimizations when it is marked as an Apartment model in the Registry. It determines the threading model from the Registry at DLL load time. The scaling characteristic of ADO ...
Quickly create a copy of an ADO Recordset
by Francesco Balena
When you want to process the data in a Recordset without affecting the actual values in the database, often the Clone method isn't what you need. For example, if you delete the records in a cloned Recordset, the original data in the database is also affected. It seems that the only way to ...
Quickly Convert Recordset into an XML File
by Deepak Pant
With MDAC 2.1 (Microsoft Data Access Components), you can generate a XML file quickly from a Recordset object. The Save() method of Recordset object takes in an optional parameter, adPersistXML, ...
Ensure Efficient Usage of Connections
by Deepak Pant
You should be very careful while establishing database connections from your Web-based application. MDAC 2.0 (Microsoft Data Access Components) provides automatic connection pooling behind the ...
SQL Stored Procedures and VB
by DevX Pro
How do I run a SQL stored procedure from within Visual Basic?
21-40 of 72     Previous     Next
Sitemap