数据库我是第一次使用Access
数据库模式:pair(p_id,p_name,p_date,p_time)
p_date格式:yyyy-MM-dd
p_time格式:hh:mm
这样的一个sql语句怎么写呢?
我的SQL语句在Access成功完成了查询,
可是为什么在程序中却出现了数据类型不匹配呢?
谢谢
--
Cookie Ren
School of Computer Engineering and Science,
Shanghai University.
-------------------------------------------------
Everything is good when new, but friends when old.
http://cookieren.blogchina.com/
tedb.values.Add(N2I.getID2("station","station_id","station_line",ddlSL1.SelectedItem.ToString(),"station_name",ddlSS1.SelectedItem.ToString()));
tedb.values.Add(N2I.getID2("station","station_id","station_line",ddlDL1.SelectedItem.ToString(),"station_name",ddlDS1.SelectedItem.ToString()));
tedb.values.Add(Convert.ToDateTime(txtDate1.Text).ToShortDateString());
tedb.values.Add(Convert.ToDateTime(txtTime1.Text).ToShortTimeString());
tedb.values.Add(Convert.ToDateTime(txtTime2.Text).ToShortTimeString());
tedb.sql=String.Format(tedb.sb.ToString(),tedb.values.ToArray());
tedb.adapter=new System.Data.OleDb.OleDbDataAdapter(tedb.sql,tedb.con);
tedb.adapter.Fill(tedb.ds);
dgSearch.DataSource=tedb.ds.Tables[0];
dgSearch.DataBind();
--
Cookie Ren
School of Computer Engineering and Science,
Shanghai University.
-------------------------------------------------
Everything is good when new, but friends when old.
http://cookieren.blogchina.com/
"小李菜刀" <caid...@hotmail.com> 写入消息新闻:20050203153456...@hotmail.com...
数据库我是第一次使用Access
数据库模式:pair(p_id,p_name,p_date,p_time)
p_date格式:yyyy-MM-dd
p_time格式:hh:mm
这样的一个sql语句怎么写呢?
我的SQL语句在Access成功完成了查询,
可是为什么在程序中却出现了数据类型不匹配呢?
谢谢
源程序: