473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Adodc

82
hi guys,
i have a doubt regarding ado data control. It facilitates us to go to previous record, next record, very first and very last records too. the thing is, i don't know how to implement this feature of the control. it should be written in the WillMove event but what shd be the code.
cd anybody help me with this please?
Thanks in advance.
Jan 8 '07 #1
5 6014
hariharanmca
1,977 1GB
hi guys,
i have a doubt regarding ado data control. It facilitates us to go to previous record, next record, very first and very last records too. the thing is, i don't know how to implement this feature of the control. it should be written in the WillMove event but what shd be the code.
cd anybody help me with this please?
Thanks in advance.

dim rst as ADODC.Recordset

'MoveFirse
rst.MoveFirse
'MoveLast
rst.MoveLast
'MoveNext
rst.MoveNext
'MovePrevious
rst.MovePrevious
Jan 9 '07 #2
Dököll
2,364 Expert 2GB
Hi aaryan!

Hopefully the below will help you achieve your goal:

(1)Start by building and access database, if you haven't already; small database call your table Aaryan as one example, perhaps 6 columns...

-UserID, CompanyName, FullAddress, City, State, Zip

(2)While creating this table, keep field data type as TEXT, this will help you in the long run

(3)Run VB 6.0, make a form, Form1, Project1 is by default, you can rename as you wish.

(4)Add 6 TextBoxes, you an name them Text1, Text2...Text6, to make it simpler

(5)You will now need to finds references and/or components, I will take a peek as write this and can tell you the specifics

-Go to Project, select Components from the menu
-Scroll down and check Microsoft Ado Data Control 6.0 (OLEDB)
-You now have a fancy adodc control to the left of your screen,
looks like a yellow container wit two arrows, under General. Please write if you cannot fnd this

(6)Click and Drag adodc1 to Form1, near your TextBoxes

(7)Right-Click on your adodc1 control, find and select ADODC Properties

(8)Use Connection String should already be selected if not, choose build, this'll allow you to find location to your Access database newly created. After finding it, hit Test Connection. If connection is successful, you are golden thus far...

(9)Say OK, get out and back to your Form1

(10)Select Text1, under properties, find DataSource, adodc1 should be in the dropdown, select it. Under CommandType, choose 2- AdCmdTable, below in RecordSource, add Aaryan, as your table name.

(11)Go to DataField, Select the first column of your Access Database, namely 'UserID'

(12) Do/Repeat same for all of your TextBoxes

(13) You can now add you command button, I almost forgot:-)

Run it, and see what happens. You may have noticed you did not wirte any code for this, it is not needed if you wish to keep it simple. If you have data in your database, hitting your adodc1 control arrows will allow you to jump from one record to the next. Please write if this does not make sense or it is not working

Good luck!

Dököll
Jan 10 '07 #3
aaryan
82
hi,
thanks for your reply. you have explained it from scratch. i appreciate your patience. i got the idea. am yet to try the code.
once again thank you.
Jan 10 '07 #4
Dököll
2,364 Expert 2GB
Please remember, you will not need any code for this. You should be all set with what you have before you...

You're quite welcome ;-)
Jan 11 '07 #5
Dököll
2,364 Expert 2GB
Please remember, you will not need any code for this. You should be all set with what you have before you...

You're quite welcome ;-)
Pushing this forward for all to see, especially You, D...
Apr 6 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: howie | last post by:
I've upgraded a vb6 application to vb .net and am having an issue. whenever I try to set the recordset property of the VB6.adodc object in .net and run the application I get the error “object...
0
by: Meher Malakapalli | last post by:
Hi I have an application built in VB6. It uses an adodc control bound to several other controls. After installing the .NET framework, the application's data-bound controls no longer display the...
4
by: Raoul Watson | last post by:
I have a form with an AdoDc control associated to a datagrid. The AdoDC uses a "ConnectionString" such as "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=..." this is...
1
by: Ariane | last post by:
I have an ADODC object in my form which populates a datagrid. I set the coonection string for ADODC at design time. The problem is that I have no way to close the connection when i exit the...
4
by: nkechifesie | last post by:
I have an adodc control that is build with several tables using the select command. I need to search for a record on the adodc, is it possibles? If yes, how?
1
by: blobi | last post by:
i tried to use adodc with unknown recordsource but it couldn't work when i was using datagrid with adodc as datasource. "ADO can not set for the command text". why i failed for using adodc with...
2
by: SHIBSHIB | last post by:
i prepare a vb project with adodc control where data will be extracted from an access file. to make an .exe file of that project what should be the path in adodc so that the exe file will be executed...
9
by: Neelesh2007 | last post by:
Hi All, I have developed project in VB6.0 with access as backend.I have used ADODC control in VB to retrieve data from access. I have created the Setup file by Package & Deployment. Now when i...
2
by: techie2 | last post by:
Can you help me to handle the error with ADODC? When I run any form which has ADODC on it I get an 'Operation was cancelled' or 'Could not find installable isam' errors. How to eliminate these...
4
by: alem | last post by:
Hallo friends! PlS help me I got confused. Can I use ADODC and ADODB together if I can; I already applied ADODC in my database file. How to use mathimatical functions and other code shall I use...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.