1.点击搜索提交,获取搜索条件,用参数形式传递到那个新的页面.2.在新页面中,执行SQL,返回数据集合.3.与DataGrid绑定,显示数据.
解决方案 »
- 使用jquery作一个纵向菜单,超级链接为何失效??
- RadUpload控件为何当文件小于5M时进度条不显示
- 为啥IE6的‘目标另存为’不能下载,火狐的‘链接另存为’可以下载?
- 在DLL中如何得到DLL自身所在的目录?
- 请问:查"张含晕"则提示"是否要查"张含韵"?(因为"晕"和"韵"是协音)这类的查询怎么做啊,难不难?(C#WEBFORM+sql server2000)
- ?????????????我不信就每人知道!!!!!!!!!
- 强烈要求将有关asp.net打印的专题置顶
- 两个以逗号分隔的字符串进行对比,取出其中不同的字符串,效率最高的是用什么方法?或者有没有类似正则表达式可以用
- 散分
- 關于XML生成樹壯結構的問題.進者有分.
- 如何实现一个PANEL嵌在FORM上的功能啊,并且点按钮让它出现
- 问个datagrid分页显示后的问题
dim scon as string="provider=sqloledb.1;user id=sa;initial catalog=northwind;data source=myserver"
dim mycon as new system.data.oledb.oledbconnection(scon)
dim mycom as new oledbcommand("select * from customers",mycon)
dim myreader as oledbdatareader
mycon.open()
myreader=mycom.executereader
注意大小写,我只是打了一些,你可以改一改..
OleDbConnection conn;
string conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ Server.MapPath("bbs.mdb");
conn = new OleDbConnection(conStr);
if(e.CommandName=="Del")
{
commandText = "Delete from content where ID = " + e.CommandArgument;
conn.Open();
OleDbCommand comm = new OleDbCommand(commandText,conn);
comm.ExecuteNonQuery();
string strDateTime = "你选择的时间"
Response.Write("<script language='javascript'>location.href(新页面.aspx?DateTime="+strDateTime +"')</script>");
显示页面:
DataSet ds = new DataSet();
string strSQL = "select * from 你的表 where DateTime=' "+Request["DateTime"];
Sqlconnection sqlConn = new SqlConnection (你的连接字符传");
SqlDataAdapter sqlAdpt = new SqlDataAdapter (strSQL,sqlConn);
sqlAdpt.Fill(ds);
this.DataGrid.DataSource = ds;
this.DataGrid.DataBinding();
注意大小写!
请问houlinghouling(新玲)怎样将那几个控件的值变成时间型的
create procedure myFind
@startDate varchar
@endDate varcharas
if (isdate(@StartDate) and isdate(@endData))=1
Begin
select * from YourTable
where ‘开始日期’= convert(smallDateTime,@startdate)
and '结束日期'=convert(smallDateTime,@endDate)
end begin
'以下为VB代码
dim strSpName as string="myFind"
dim mycn as string="provider=sqloledb.1;user id=sa;initial catalog=northwind;data source=myserver"
dim mycon as new system.data.sqlclient.sqlconnection(scon)
dim mycmd as new sqlcommand(strSPname,mycn)mycmd.CommandType=CommandType.StoredProcedure....................