获取所有表名称到数组(使用sql和c ++) [英] Get all table names to array (Using sql and c++)

查看:86
本文介绍了获取所有表名称到数组(使用sql和c ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


请帮助我完成代码.我想将所有表名都保存到一个数组中.
这段代码行吗?如果没有,请提出一种方法...

Hi,
Please help me to complete the code. I want to get all table names to an array.
Will this code work? If not, please suggest a method...

SqlString =  "select * from sys.tables";
	recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly);
	while( !recset.IsEOF() )
		{
			//Please complete
			recset.MoveNext();
		}

推荐答案

为什么问?创建一个小的测试程序,您将得到答案...如果此时遇到任何问题,请随时在论坛上提问.

您可以使用以下
Why ask? Create a small test program, and you''ll have your answer ... if you run into any problems at that point, feel free to ask here on the forum.

You can use one of these CRecordset[^] as a starting point.

Best regards
Espen Harlinn


这篇关于获取所有表名称到数组(使用sql和c ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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