如何在Windows平台下使用C从数据库获取字符串数据值 [英] how to get the string data value from the database using c under windows platform

查看:94
本文介绍了如何在Windows平台下使用C从数据库获取字符串数据值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.我创建了一个用于从数据库中获取数据的程序.
数据库是mysql数据库;
我完美地检索了整数数据类型..
但是我无法从数据库中检索字符串值.
我的编码是获取数据是:


. i create a program for fetching data from the database .
database is mysql database;
i working perfectly for retrieving the integer data types..
but i can''t able to retrieve the string value from the database.,.

my coding is to fetch the data is:


RecSet = Con->Execute("SELECT * FROM t2",RecordsAffected,1);
        while(!RecSet->EndOfFile)
        {
            cout<<RecSet->Fields->GetItem("Id")->Value.intVal<<"\n";
    //  Field1 = RecSet->Fields->GetItem("Name")->Value.bstrVal;
        //  char *p= (char *)f1;
            RecSet->MoveNext();
        }




您可以提供解决问题的解决方案吗?.




can you give the solution to rectify the problem..

推荐答案

用您自己的.. google搜索数据.
..
search the data with your self .. in google.. don''t ask small small query to us
..


这篇关于如何在Windows平台下使用C从数据库获取字符串数据值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆