VC++2005中如何获取SQLserver2000的返回结果
public: static String^ MySQLConnectionString= L"Data Source=(local);Initial Catalog=DBCommunity;Integrated Security=True";
String^ MySQL = "Select * From 小区信息 Where 优先级=1";
SqlConnection^ MyConnection = gcnew SqlConnection(MySQLConnectionString);//连接数据库
MyConnection->Open();//打开连接
System::Data::DataTable^ MyTable = gcnew System::Data::DataTable //在内存中创建一张数据表
SqlDataAdapter^ MyAdapter = gcnew SqlDataAdapter(MySQL, MyConnection);
MyAdapter->Fill(MyTable);
数据库DBCommunity里有小区信息表,该怎么样从程序里判断 这表里是否有 优先级=1 的条目,判断出来的结果怎么获得?
麻烦程序高手看看上述的解释对不对,非常感谢各位大侠的赐教!