Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Search the Tips

ADO - Page 3

41-60 of 72     Previous     Next
Can ADO Read and Write XML Files as Recordsets?
by DevX Pro
Can the latest version of ADO (ActiveX Data Objects) read and write an XML file as a recordset?
Speed up Recordset creation with the CommandType property
by Marco Bellinaso
If you want to create an ADO Command using VB code, remember to always set the CommandType property to the appropriate adCmdxxxx constant value. If you don't this, will be used the default adCmdUnknow value, and the Data Provider must test the CommandText property to determine if it is a ...
Problems with ADO
by DevX Pro
I was out on the Fox newsgroup and somebody posted some ADO code in Visual FoxPro that alarmed me. VFP seems to have a major problem repeatedly accessing the Field collection on the ADO recordset. There seems to be a huge memory leak. I ran the following code in Visual Basic and in VFP and the results were astonishing. The time it takes VFP to complete the program grows exponentially as you increase the iterations of the loop, while VB stays the same. If you comment out the FOR EACH loop where it goes through the fields collection, VFP gives the same nice results as VB. What is wrong? Here is the VFP code: local oConnection, oRecordSet, intOuter, oField, intLoop oConnection = createobject("adodb.connection") with oConnection .Provider = "SQLOLEDB.1" .ConnectionString = "Persist Security Info=False;"+; "User ID=sa;Initial Catalog=Pubs;Data Source=(local)" .open() endwith for intOuter = 1 to 20 StartTime = seconds() oRecordSet = createobject("adodb.recordset") with oRecordSet .open("Select * From Customer", oConnection) for intLoop = 1 to 5 do while not .eof for each oField in .Fields next oField .movenext enddo endfor .close endwith oRecordSet = Null ? intOuter,seconds() - StartTime endfor oConnection.close oConnection = null I'd appreciate any workarounds. The newsgroup is eating me alive as I'm trying to defend VFP as a serious middle-tier solution.
Another way to Check if the ADO Recordset is Empty
by Jai Bardhan
ADO sets both the EOF and BOF properties to true if the recordset is empty. You can check these properties to determine if the recordset is empty or not instead of checking the RowCount or ...
Handle Update Collisions in ADO Disconnected Recordsets
by Jai Bardhan
Data-access techniques using cached data on the client for updates is possible using disconnected recordsets. This technique generates collisions in some situations. However, the technique for ...
Display Contents of ADODB.Errors Collection
by Deepak Pant
When ADO encounters an error, the Errors ...
Use Recordset.Supports() Method for Robust Code
by Deepak Pant
You can use Supports() method of ADODB.Recordset object to write robust ...
ADO Data Control
by DevX Pro
I hope that you might be able to help me with the problem I am experiencing. I am developing an application in VB6 using ADO Data Control. I need to set the EditMode Recordset property, which is read only, to EditInProgress. This is normally done by .Edit method, but the ADO Recordset is missing this method and none of the others available seem to do the trick. How can I set EditMode to EditInProgres?
Check if Provider Supports Transactions
by Deepak Pant
A transaction can be defined as a related set of operations that read and modify data in a single batch. Every transaction should follow the ACID rule, where ACID stands for atomic, consistent, ...
Select Proper Cursor and Lock Types
by Deepak Pant
You can improve performance of your ADO applications by properly selecting the Cursor and Lock Types while opening the recordsets. Cursor Type indicates the type of the cursor the provider should use ...
Cloning a Recordset
by Deepak Pant
You can use Clone() method of ADODB.Recordset object to create a duplicate ...
Accessing A Password Protected
Database with Data Controls
by DevX Pro
In a VB application, I have multiple forms with data controls on each form which connect to a password protected Access database. Every form pops up a message stating an invalid password. How do I connect to the database with the Data Controls specifying the password?
IIS - Manipulating the Metabase
by DevX Pro
I have been trying to change settings for the IIS server in order that I can set the flag to allow an out-of-process Active X EXE Server to be used from within an ASP page. It seems that one can call an in-process DLL server without a problem, but an error occurs when I try to call the EXE. How does one call an Active X EXE (out of process) from within ASP, and set the flags for the metabase? The sample code such as: Dim ComputerObj Dim MaxBW Set ComputerObj = GetObject("IIS://LocalHost") MaxBW = ComputerObj.MaxBandwidth and the code such as Set VSvrObj = GetObject("IIS://LocalHost/W3SVC") VSvrObj.AspAllowOutOfProcComponents = True fails to execute.
Problems with VB6, Access 2000 and ADO
by DevX Pro
I am doing a project where VB6 talks to Access 2000 thru ADO. I am using a login dialog to obtain the username, password & DSN (ODBC Data source name) to connect with the Access 2000 database. The code for this works fine when using it to connect with the Access 2000 database. Since I needed to implement the security at database level, I used the "User Level Security Wizard" of Access to "secure" the database (it creates a workgroup file containing the user logins, and you can add new users and define the passwords). The moment I try to connect with this "secured" database, I get (ODBC driver ???) errors like "You do not have the necessary permissions to use the '(unknown)' object. Have the system administrator or the person who created this object establish the appropriate permissions for you " and the usual "Driver's SQLSetConnectAttr failed." Should I be specifying the workgroup file in my connection string? I tried the help topics but there was no info on this??? I tried with both ADO 2.0 and 2.1. The error is the same.
Avoid Using Refresh() Method
by Deepak Pant
Refresh method of Parameters collection is used to populate the Parameter objects in the collection. This method queries the data provider to populate the collection with Parameter objects ...
Use Stored Procedures with Output Parameters
by Deepak Pant
If you already know that the execution of your SQL statement will return a single row of data, then you should always prefer stored procedures with output parameters in place of single-row select ...
Check if Provider Supports Output Parameters from Stored Procedures
by Deepak Pant
You can always write a stored procedure which can return some value in the form of parameters. This feature to return information from stored procedures in the form of parameters is very useful. But ...
Benefits to Executing SQL Queries with the Command Object
by Jai Bardhan
You should compile your SQL queries with the ADO Command object to avoid problems that can arise from concatenating strings and variables to form SQL queries. Using Command object's Parameter ...
Using ADO-Connected Recordsets with MTS
by DevX Pro
Can I use ADO-connected recordsets with MTS? From the information I can find it seems that MTS does not handle them.
ADODB.Recordset Type "Not Defined"
by DevX Pro
I copied the following code from a good book on e-commerce, but the VB code (Visual Studio 6.0 Enterprise) gets an error on the Dim rsBankData line "User-defined type ont defined." Why is this? Option Explicit Public Function Transfer(vUserName As Variant, vTransferAmount As Variant, _ vSavingsBalance As Variant, vCheckingBalance As Variant) As Variant '/ Declare local variables Dim cyTransferAmount As Currency Dim strQueryString As String Dim rsBankData As ADODB.Recordset
41-60 of 72     Previous     Next
By using this site, you agree to the Privacy Policy
Thanks for your registration, follow us on our social networks to keep up-to-date