Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2007, 10:13 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Vb-access connectivity problem


Hi,
  here is some code:

Private Sub Command1_Click()
    Data1.Refresh
    Data1.Recordset.AddNew
    Data1.Recordset.Update
End Sub

Private Sub Command2_Click()
    On Error Resume Next
        Data1.Recordset.Delete
        Data1.Refresh
        If Not Data1.Recordset.EOF Then
            Data1.Recordset.MoveNext
        ElseIf Not Data1.Recordset.BOF Then
            Data1.Recordset.MovePrevious
        Else
            MsgBox "This was the last record in the table"
        End If


End Sub

Private Sub Form_Load()
 Data1.Refresh
End Sub

Using above code we can insert records and delete records. Where in back end there is a ms-access database. There are three fields in the database namely

Fieldname

Roll numeric primarykey
Name text
Age numeric


When all the records are deleted, we cannot insert any new record using command1 and there is some runtime error
3426 occurred. the error is "The action is cancelled by an associated property". How can I debug this?

                                        -Saptarshi





 
Old January 24th, 2007, 10:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

will this link help??
http://support.microsoft.com/?scid=k...9851&x=13&y=14

it came out after looking for your error in google...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Connectivity .NET dpkbahuguna ASP.NET 1.0 and 1.1 Basics 2 February 9th, 2007 12:20 AM
connectivity between ms-access and vc++ umang.cs Visual C++ 0 May 1st, 2006 10:07 AM
connectivity problem with crystal reports & vb rni Crystal Reports 0 April 19th, 2006 03:29 AM
VB MSSQL database REmote connectivity srichary Pro VB Databases 0 November 28th, 2004 06:33 AM
Help! Access Database Connectivity John Mack Classic ASP Basics 2 October 10th, 2003 06:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.