Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5957897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:27:58+00:00 2026-05-22T18:27:58+00:00

I am unable to write any records to my database using a web service.

  • 0

I am unable to write any records to my database using a web service. Service is set up OK and can access it via uri and also query my database via the service using a simple page i created.

When it comes to writing to the database, I am not getting any errors, and the instance of my WebClient which is populated with variables to write to the db is holding all the variables OK but when it comes to actually writing to the db (see below code) nothing seems to happen except that the Member ID of the last existing member added to the database is returned.

        'assign all abMem fields to values within form to write to database
        newMem.Title = ddTitle.SelectedValue
        newMem.Initials = txtInitials.Text
        newMem.Surname = txtSurname.Text
        newMem.Address1 = txtAdd1.Text
        newMem.Address2 = txtAdd2.Text
        newMem.Address3 = txtAdd3.Text
        'etc etc .... additional fields have been removed

        Try
            cc.Open()
            cc.CreateMember(newMem)
            returnMem = cc.GetMember(newMem)
            MesgBox(returnMem.MemberID & " - Member Created")
            cc.Close()
        Catch cex As CommunicationException
            MesgBox("CommEX - " & cex.Message)
            cc.Abort()
        Catch tex As TimeoutException
            MesgBox("TimeEX - " & tex.Message)
            cc.Abort()
        Finally
            MesgBox("Closed the Client")
        End Try

When i run the above, I’ve noticed in the log file for the service (in the system32 folder on my server) that 2 requests are made each time – presumably one for where I am trying to add a record and the other I would think would be the request for the ID of this member (which isn’t created, hence why I believe it it is simply returning the last successful entry in the table).

I know there isn’t a problem with the actual web service as there is another user successfully able to add to the db via the service (unfortunately I am unable to simply copy their set-up as they are hitting it via a php page) so i know there is a problem somewhere in my code.

Is cc.CreateMember(newMem) the correct syntax for passing a member’s details to the function in the webservice is what I am wondering?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:27:59+00:00Added an answer on May 22, 2026 at 6:27 pm

    I’ve re-wrote the code (seems identical to above) and republished the web service. Seems to be working OK now so I must have had some silly mistake somewhere!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am unable to write log any info, error, debug using log4net, i tried
I am using Savon to write a Ruby interface to a SOAP service. It
Is there any way to write a greatest-n-per-group query in HQL (or potentially with
I am using twill and python to write a web crawler. showforms() returns Form
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending
I'm trying to write a behavior that will give my models access to a
I am unable to get any test cases that extend ServiceTestCase to run. There
I'm trying to write a full screen application for Windows CE 5.0. I'm using
I want to write an efficient query which returns a list of fruits by
I searched around on Google, but I was unable to find any libraries for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.