a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 144|回复: 0

[考试试题] ACCESS的参数化查询(三)

[复制链接]
发表于 2012-7-31 22:29:16 | 显示全部楼层 |阅读模式
using System;   using System.Data;
5 b& n7 ^9 E* z2 D7 e3 r* ?$ S2 m  using System.Configuration;$ q, K2 t' |; s6 O
  using System.Web;- R) W, `! x5 G
  using System.Data.OleDb;( t: Z2 b2 a- Z! a) R, _
  namespace acc_select' Z) V& S; [5 d( U) C/ k9 ]
  {7 x+ Y" M) V% Q9 x! N
  /// : S" f7 M/ f1 o/ b/ J
  /// accselect 的摘要说明
, U8 z1 }  ]/ w/ v  ///
+ a2 ?. m% J5 \% \% Z  public class accselect$ D8 h" P- `/ V0 @! g
  {
) b0 j  p6 b2 _1 p% j  //"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\dq\db1.mdb"+ ~4 O3 D! ]$ p
  private string conn = ConfigurationManager.ConnectionStrings["tsingConnectionString"].ToString();$ L! `0 X5 i8 K  O! T1 n7 F. w
  public string sql = string.Empty;- f9 J; |8 J0 X3 |' M
  public int t = 4;4 z7 ?5 m& u* h. O5 n2 b
  public object v = null;$ L6 m# ?0 B" H/ x1 [
  public accselect()
6 h9 ~$ c$ L8 k3 a9 T! x  {& t! J  A' j+ J% N1 O
  }
- P* H2 J" m( s. n  /// ! v, c$ |' x- T+ b
  /// 构造函数,传递ACC参数查询语句2 y. M  C6 [% G3 J  }
  ///
5 m% j- @& X/ L1 g1 g0 z" b: c
( k7 M/ I! }' k0 q* [  /// strsql字符型6 G  R! \+ \/ Y; B$ D
  public accselect(string strsql)0 ^$ ]% w- ]( {* _+ c0 U  m3 }8 s! ~. f
  {# X) s3 {9 w$ q. _2 P/ i
  sql = strsql;
( p& ?% t: [8 ?8 K4 ~" c; k  }
7 y5 r9 M& g, M5 t: ~3 T  ///
/ b" g3 u" [2 u$ t/ \7 l/ z) U/ j  /// 构造函数,传递ACC参数查询语句' K$ ^7 N2 O9 s' B8 L3 {
  ///
% k# w% o* d- J% b- P" k8 [& d* |% \7 Z7 U' [
  /// 参数查询语句( N0 |8 I: ?6 l( J4 D' `" e; z

/ D$ w( M& w9 ]# }" n$ p) }  /// 字节数
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-6-18 06:50 , Processed in 0.261036 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表