Jump to content
  • 0
luizcruz

Select Data Using Caspio Bridge Ws Api

Question

Hello!

 

Studying the "Caspio Bridge Microsoft .Net Framework Sample", that is a general example of WS API usage in C# .Net Windows applications and demonstrates the object de-serialization and usage of SelectDataXML and ListObjects WS API methods, we could connect to our Caspio Bridge tables via WS API and Select our field values.

 

The sample code below is working perfectly!

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.Timers;

using dataPhase.com.caspio.c0bkr041;

using System.Web.Services.Protocols;

using System.Xml;

 

namespace dataPhase

{

    public partial class Form1 : Form

    {

        private static CaspioBridgeAPI soapClient;

 

        public Form1()

        {

            InitializeComponent();

 

            soapClient = new com.caspio.c0bkr041.CaspioBridgeAPI();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            string sXML;

            IDictionary<string, string> sRecord = new Dictionary<string, string>();

            XmlDocument mXMLDoc = new XmlDocument();

            XmlNodeList mList;

            XmlNode mNode;

            sXML = soapClient.SelectDataXML("AccountID", "Profile", "Password", "My_Users", false, "", "User_ID=" + textBox3.Text, "", false, false, true, false);

 

            mXMLDoc.LoadXml(sXML);

            mXMLDoc.Save("My_Users.xml");

            mNode = mXMLDoc.SelectSingleNode("// My_Users");

            mList = mNode.SelectNodes("./*");

            

            foreach (XmlNode mFieldNode in mList)

            {

                sRecord[mFieldNode.Name] = mFieldNode.InnerText;

            }

 

            textBox1.Text = sRecord["First_Name"];

            textBox2.Text = sRecord["Last_Name"];

            textBox5.Text = sRecord["Phone"];

            textBox4.Text = sRecord["Address"];

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            textBox3.Text = "Enter User ID";

        }

    }

}

 

Now we would like to learn how to insert and update data in our Caspio Bridge database!

 

Please,

 

Could someone show us how to add a new user information using the same approach?

 

and how we could update a specific user information?

 

Best Regards!

 

Luiz

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi luizcruz, have you seen this: http://static.caspio.com/pdfs/Caspio-Bridge-Web-Service-API.pdf

It is the Programmer's Documentation for Caspio Bridge WS API. It has example for C# in inserting and updating data. You can also refer to their help center articles about the subject: https://howto.caspio.com/web-services-api/soap-api/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×