Hi, I used to be using Data Access Object (DAO) with Microsoft Data Grid Control 5.0 (SP3) whereby all the data from Access database are all presented in Data Grid Control 5.0.However after I transffered all my program to another pc. My Data Grid control which I added to the form which I created my application can no longer be found, i.e. When I loaded the form during run, it keeps complaining:Line 256: Property OleObjectBlob in recordGrid could not be set.Line 256: Cannot load control recordGrid; license not found.Why is this so??It seems that when I install a copy of Visual Basic 6.0 Enterprise Edition in the other pc which I have this problem, the DBGrid32.ocx control cannot be found at all, so I tried to copy the control from the other pc(as well as from the Visual Basic CD-Rom) and load it into the pc and then added the control in the form, however it gives me this message:License Information for this component not found. You do not have an appropriate license to use this functionality in the design environment.
What can I do to resolve this prolem?You are not a licensed user of the ActiveX control. This error has the following cause and solution:You tried to place an ActiveX control on a form at design time or tried to add a form to a project with an ActiveX control on it, but the associated information in the registry could not be found.The information in the registry may have been deleted or become corrupted. Reinstall the ActiveX control or contact the control vendorHow can I reinstall the ACtiveXControl so that I can use it together with DAO again in VB 6.0, can anyone please help.
Data Access Object In Vb 6.0 Pdf Average ratng: 6,0/10 7985 votes DAOEnrol: Database Application, Lesson 1 Tip If you prefer working from a printed tutorial, see in MSDN Library Help for details about printing a lesson, a set of topics, or a single topic. VB & Database Systems. New Technologies in VB6. ActiveX Data Objects (ADO). DataList and DataCombo replace DBList and DBCombo. The DataGrid is.
Thanks a millionRE: Microsoft Data Bound Grid 5.0 (SP3) Problem (IS/IT-Management) 6 Mar 02 07:32. Some are these problems (The ones with Common Controls) are indeed licensing. You need to install VB5, which will add the license, and then VB6.Or:Remove all the component references for Microsoft Common Controls 5.0 (first you have to remove the components form your forms) and exchange them for Microsoft Common Controls 6.0Or Best Choice:Look for a program on the VB6 CD called PrjUpgd (I believe under Tools). Run this program and it will update the components in your project from VB5 to VB6.For the other controls I would uninstall VB6 completely and then do a reg clean with Norton or Fix-It utilities, and then re-install VB6.
RE: Microsoft Data Bound Grid 5.0 (SP3) Problem Guest (visitor) 22 Apr 02 06:47.
When it comes to implementing a data access solution in your VB applications, you currently have three choices: Data Access Objects (DAO), Remote Data Objects (RDO), and ActiveX Data Objects (ADO). In this series of articles, we will examine each of these options, noting their similarities and differences. We'll also look at some cases where one is better suited for a specific task than another.
Let's start with a look at DAO.basicsDAO, which was created before RDO and ADO, is a set of objects that enables client applications to programmatically access data. But DAO doesn't just let you access data—it also lets you control and manage local and remote databases in various formats.
Using DAO, you can create and modify the database structure; create tables, queries, relationships, and indexes; retrieve, add, update, and remove data; implement security; work with different file formats; and link tables to other tables.To understand DAO better, let's look at the DAO objects in Figure A. Figure ANames and descriptions of common DAO objectsThe DBEngine is the highest-level object in the DAO object model. It contains all other objects and collections. The Database object is the member of the Databases collection of the default Workspace object, which is a member of the Workspaces collection of the DBEngine object.With DAO, objects you use to work with the data in the database are generally not saved but are created every time you need them. Objects that represent the structure of the database are saved with the database. When you create a new DAO object to be saved in the database, you have to append it to the appropriate collection using the collection's Append method. Keep in mind that all DAO objects are indexed beginning with zero.DAO lets you work with three database formats:.
Microsoft Jet (all databases that are created with the Microsoft Jet database engine). Installable ISAM format. ODBC data sourcesJet and ISAM data use the Microsoft Jet object model; however, with ODBC data, you can use either Microsoft Jet or ODBCDirect. There are some limitations in accessing ODBC data using Jet, although you can use it if you need to take advantage of a particular Jet feature. But ODBCDirect is more flexible, allowing you to run queries or stored procedures against the backend server and perform batch updates and asynchronous queries. It also makes your application run faster because it allows you to bypass Microsoft Jet's middle layer.Let's take a look at the Jet and ODBCDirect object models.Microsoft Jet objects include TableDef, QueryDef, Field, Index, Parameter, Relation, Recordset, User, Group, Container, and Document.
(See Figure B.). Figure BDAO with Microsoft Jet object model (Source: Microsoft)The DBEngine object contains two collections: Workspaces and Errors. The Workspaces collection is the default collection of the DBEngine, so you don't have to refer to it explicitly. When you don't specifically create a new Workspace object, DAO will create one for you. The setting of the DefaultType property of DBEngine determines what type of workspace is created for Microsoft Jet or ODBCDirect. The default value of this property is dbUseJet, but you can explicitly set it to dbUseODBC as the type argument of the CreateWorkspace method.The Workspace object defines a session for a user based on users' permissions and allows managing of the current session.
It also contains open databases and offers mechanisms for simultaneous transactions and for securing the application. The Fields collection is the default collection for TableDef, QueryDef, Index, Relation, and Recordset objects. Recordset objects can be of the following types: Table, Dynaset, Snapshot, or Forward-Only.The DAO ODBCDirect object model includes a subset of the objects in a Microsoft Jet workspace and the Connection object, as shown in Figure C. Figure CDAO with ODBCDirect object model (Source: Microsoft)To establish a connection using ODBCDirect, you have to use the OpenConnection method on a new Connection object or the OpenDatabase method to open a new Database object. A Connection object represents a connection to an ODBC database in an ODBCDirect workspace. The Connections collection contains all currently open Connection objects.
When you open a Connection object, it is automatically appended to the Connections collection of the Workspace object. When you close a Connection object with the Close method, the Connections object is removed from the Connections collection.In addition to the Table, Dynaset, Snapshot, and Forward-Only types of Recordsets, ODBCDirect offers the Dynamic type.On the plus side, DAO is fairly easy to use. And since DAO has been around longer than RDO or ADO and has been used in more projects, it pays to know how DAO works. Furthermore, if your application is running in a 16-bit environment, DAO is your only choice.But DAO is older technology, and it doesn't offer as much functionality as RDO and ADO. For instance, ADO can provide an interface to e-mail and file systems and custom business objects, as well as other sources. Microsoft is now focusing most of its improvements and advances on ADO, as well.Generally, it's better to use DAO for accessing local databases where the speed is not the top priority and the number of users is limited, and to use either RDO or ADO for accessing remote databases and for larger scale projects.To demonstrate how you might put DAO to work, let’s create a simple VB project to access the data stored in Microsoft's sample Northwind database. 1.
Fire up VB and start a new project. 2. Go to Project References and select Microsoft DAO 3.6 Object Library, as shown in Figure D. (Depending on the version of VB you are using, you will have a corresponding DAO Object Library version, so if you don't have DAO 3.6, use an earlier version instead.). Figure EWe've added some objects to our form. 5.
Add the code in to the cmdGetDataJetClick event. 6. Add the code shown in to the Private Sub cmdGetDataODBCDirectClick event. 7.
Modify strLocation to reflect the location of the Northwind database on your machine or use another.mdb database and modify Set dbJet = wrkJet.OpenDatabase(strLocation & 'Northwind.mdb') to reflect the name of the database. 8. Modify strConn to reflect the DSN name, password, and UID of a remote database.
9. Modify the query in Set rsODBCDirect = conODBCDirect.OpenRecordset('SELECT LastName FROM Employees', dbOpenDynamic) to reflect the query you'd like to run. 10. Press CtrlF5 to run the project.
Data Access Object In Vb 6.0 Pdf 1
11. Click the Get Data Jet button and the Get Data ODBC Direct button to obtain data using Microsoft Jet and ODBCDirect, respectively. 12.
Data Access Object In Vb 6.0 Pdf Converter
You should see a screen like the one shown in Figure F.