473,511 Members | 16,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not able to add new record and insert record to MS access database using ADO Control

8 New Member
Hello,

I have several textboxes on my VB6.0 form.I am using textboxes one for each field. I have Placed adocontrol on my form to connect to MS access database. The connectivity is fine.

I have problem adding new record and inserting records to the database. For eg. I have a Insert button.

Private Sub Insert_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("First Name") = Form1.Text2.Text
Adodc1.Recordset.Fields("CaseNo") = Form1.Text1.Text

Adodc1.Recordset.Update.
End Sub

When I click on the Insert button, I get
" Run Time error 91", Object Variable not set". Th yellow error line is highlighted on Adodc1.....

I never had this problem before in my previous projects. It worked great. But suddenly , even a simple test project seems to get errors with ADO control.

Can you please help resolve this problem.

Thank You,
Pratibha
Jul 19 '07 #1
3 2689
thamaraikeeran
6 New Member
hi pratibha,
please see this url http://www.startvbdotnet.com/ado/Simplebinding.aspx
it will help u.
Jul 19 '07 #2
mysore
8 New Member
Thanks. This really helps. I will try this .

Pratibha


hi pratibha,
please see this url http://www.startvbdotnet.com/ado/Simplebinding.aspx
it will help u.
Jul 20 '07 #3
mysore
8 New Member
hi pratibha,
please see this url http://www.startvbdotnet.com/ado/Simplebinding.aspx
it will help u.
It worked. Thanks.

Pratibha
Jul 26 '07 #4

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

Similar topics

4
3843
by: Jim in Arizona | last post by:
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure...
9
12316
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft...
3
1667
by: Terry | last post by:
Hello, I would appreciate any advice or help with a number of bugs I have in Access 97 front end/SQL 2000 database. Just a little background information to get started. I have just converted...
4
11817
by: authorking | last post by:
I use the following code to insert a data record in to a datatable of an access database.But every time I execute the command, there will rise an exception and the insert operation can't be...
22
18764
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
1
3689
by: JayD | last post by:
Here is the problem: Using asp.net 2.0 to create a web app with standard master table gridview and child detailsview with insert capability. SQL Server 2000 database on the backend. Using Visual...
10
12658
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
1
3173
by: Zuggy | last post by:
I'm trying to create a registration/login script using Access 2003. I'm using ADOdb to connect through ODBC. <?php // Connects to your Database include('adodb/adodb.inc.php'); # load code...
3
3342
by: Surya | last post by:
Dear All, I have problem on inserting a record to database..Although it looked easy.. i have caught up with following issue .. please go ahead and help me to find solution I Need to insert...
0
7242
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
7138
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
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.