易截截图软件、单文件、免安装、纯绿色、仅160KB

在VB2008 速成版中使用参数化SQL查询语句无效

  最近刚学会在VB2008 中使用参数化SQL语句,于是马上用到代码中,却碰到查不到任何数据的情况,纠结了好几天,还是没有搞明白,差点吐血。不得已还是先在代码中使用字符串拼接的SQL语句。
  包含参数化SQL语句的代码如下:
            Dim cmSl As New OleDbCommand("select * from PENA where VSL_VOY=@vsl_voy and POD"+ _                                                                                                                                 "LIKE @pod ",dbCon)
            Dim paPOD As New OleDbParameter("@pod", OleDbType.VarChar)
            Dim paVSL_VOY As New OleDbParameter("@vsl_voy", OleDbType.VarChar)
            
            paPOD.Value = IIf(Me.TextBoxPOD.Text.Length = 0, "%", Me.TextBoxPOD.Text.Trim.ToUpper)
            paVSL_VOY.Value = Me.TextBoxVSL_VOY.Text.Trim.ToUpper
            cmSl.Parameters.Add(paVSL_VOY)
            cmSl.Parameters.Add(paPOD)
    &nbs


相关文档:

VB/VBA通用路径选择对话框

Option Explicit
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pDisplayName As String
lpTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathfromIDList Lib "shell32.dll" Alias _
"SHGetPa ......

sql:存储过程,事务,out参数

CREATE proc [dbo].[proc_DeleteTemplet] (@templeId varchar(15),@errorMessage varchar(50) output)
as
begin
  declare @error int
  set @error =0
  begin tran
  delete from tc_templet_Head where fBillNo=@templeId
  set @error=@error+@@error
  delete from tc_templet_ ......

简单的SQL面试题

1. Q. What is a join?
   A. Join is a process of retrieve pieces of data from different sets (tables) and returns them to the user or program as one joined collection of data.
2. Q. Can a table have more than one foreign key defined?
   A. A table can have any number of foreig ......

sql行转列


写一个存储过程,将表一按照表二的形式进行查询。
仓库名称 商品名称 数量
A
S001 12
A S002 17
A
S003 10
B S001 21
B
S002 5
B S003 ......

Sql Server 2005 Express数据库导入导出功能的实现

      记得以前用SqlServer 2000的时候在“右键数据库->所有任务->导入数据/导出数据”这个选项,但是最近在使用SqlServer 2005 express的时候发现居然没有“导入/导出”功能,这个让人相当郁闷。
      后来网上一查才知道是因为我用的是ex ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号