首页 > 如何通过vb.net API接口向服务器数据库表中插入数据?

如何通过vb.net API接口向服务器数据库表中插入数据?

使用xml 进行md5加密,通过API接口,向服务器数据库中,按数据字段post数据,vb.net实现,谢谢,看了一些参考文档,依然云里雾里。


include

using namespace std;

class student
{

public:
    student()
    {
    }
    student(long id, char *name, float weight):IID(id), pchName(name), fWeight(weight)
    {
    }
    ~student()
    {
    }
    void print()
    {
        cout << " student.id = " << IID << ", student.name = " << pchName << ", student.weight = " << fWeight << endl;
    }
    void setIID(const long id)
    {
        this->IID = id;
    }
    const long getIID()
    {
        return this->IID;
    }
    void setWeight(const float weight)
    {
        this->fWeight = weight;
    }
    const float getWeight()
    {
        return this->fWeight;
    }
    void setName(char * const name)
    {
        this->pchName = name;
    }
    const char * getName()
    {
        return this->pchName;
    }
    student &operator = (const student &s1)
    {
        this->IID = s1.IID;
        this->pchName = s1.pchName;
        this->fWeight = s1.fWeight;
        return *this;
    }
private:
    long IID;
    char * pchName;
    float fWeight;

};

int main()
{

student s1(155555, "john", 15.2f);
s1.print();
s1.setIID(1566465464);
s1.setName("boss");
s1.setWeight(11.4f);
cout << " s1.id = " << s1.getIID() << ", s1.name = " << s1.getName() << ", s1.weight = " << s1.getWeight() << endl;
cout << " s1 " << &s1 << endl;
student s2 = s1;
cout <<" s2 "<< &s2 << endl;
system("pause");
return 0;

}

仅供参考!

【热门文章】
【热门文章】