SELECT根据发货日期排序 为什么不行?

cg600 2008-04-27 09:41:23
Q1->Close();
Q1->SQL->Clear();
Q1->SQL->Add("Select * From c order by dateofdisp");
Q1->ExecSQL();
Q1->Active=true;

结果还是杂乱的日期
...全文
71 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
cg600 2008-04-29
  • 打赏
  • 举报
回复
不对,我在别的控件上也是用这段代码 运行OK, 但在这个控件上就不行了

void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
int aa=10;
aa=ComboBox1->ItemIndex+1;

switch (aa){
case 1:
Q1->Close();
Q1->SQL->Clear();
Q1->SQL->Add("Select * From c order by dateofdisp");
//Q1->ExecSQL();
Q1->Active=true;

case 2:
Q1->Close();
Q1->SQL->Clear();
Q1->SQL->Text="select * from c order by chang";
Q1->ExecSQL();
Q1->Active=true;
break;
路过路人乙 2008-04-28
  • 打赏
  • 举报
回复
1.2楼方法均可
吴丁 2008-04-27
  • 打赏
  • 举报
回复
Q1->Close();
Q1->SQL->Clear();
Q1->SQL->Add("Select * From c order by dateofdisp");
Q1->Open();
ydlchina 2008-04-27
  • 打赏
  • 举报
回复

Q1->Close();
Q1->SQL->Clear();
Q1->SQL->Add("Select * From c order by dateofdisp");
//Q1->ExecSQL(); //去掉
Q1->Active=true;


1,178

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 数据库及相关技术
社区管理员
  • 数据库及相关技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧