Jump to content
  • 0

Select Data Using Caspio Bridge Ws Api


luizcruz
 Share

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

Link to comment
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/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...