Question

Asked on 2003-05-29 at 16:53:16ID: 27005406

    How do i close a connection after using .addnew?

    by: louishp50

    Rating8.8Very Good

    Hi, I've got some code which add's all the data on a form and sends it to a mysql database. it's as follows:

    rsDB.Open "select * from allusers", DBConn, adOpenForwardOnly, adLockOptimistic
    rsDB.AddNew
    With rsDB
        .Fields("user") = Text1.Text
        .Fields("company") = Text2.Text
        .Fields("address") = Text3.Text
        .Fields("phonenumber") = Text4.Text
        .addnew
    end with
    rsdb.close

    when i try to close it, it says "Operation not allowed in this context" (Run time error '3218')

    how do i close the item so other forms in the app can do there thing?

    Related Solutions

    Solution

    Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

    About this Solution

    View This Solution - Start Your 30 Day Free Trial
    Zone
    general
    Tags
    Participating Experts
    5
    Solution Grade
    A

    Replies

     by: emoreau

    Posted on 2003-05-29 at 17:00:17ID: 35610421

    All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

     by: jayeshshah

    Posted on 2003-05-30 at 01:44:48ID: 35610422

    All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

     by: Balshe

    Posted on 2003-06-03 at 02:05:39ID: 35610423

    All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

     by: ayufans

    Posted on 2003-11-07 at 20:44:01ID: 35610424

    All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

     by: Computer101

    Posted on 2003-11-15 at 12:45:09ID: 35610425

    All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

    Log In

    Forgot your password?Sign up

    Top Experts

    1. jimpen

      3,600

      0 points yesterday

      Profile
    2. boag2000

      2,000

      0 points yesterday

      Profile
    3. als

      1,360

      0 points yesterday

      Profile

    BrowseAre you an Expert?