摘要:
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;using System.Text;namespace WFWMS.Lib{ public class GridV 阅读全文
摘要:
1.装人口信息系统接口软件2.程序-人口信息系统接口软件- 右键delphitest 属性 -寻找目标 -开发包-termb.dll、WltRS.dll 考到开发文件debug里3代码如下:using System.Runtime.InteropServices;using System.Text;[DllImport("termb.dll", EntryPoint = "InitComm")] static extern int InitComm(int Port); [DllImport("termb.dll", EntryPoi 阅读全文
摘要:
strsql.Append(string.Format("<td align='center'>{0}<input name='snedit' type='hidden' value='[{0}]' /></td>", dr1["PNorMN"].ToString())); string valuelist = Request["snedit"].ToString(); //获取名为'snedit' 的所有值 格式如下 阅读全文
摘要:
using System.Collections.Specialized;NameValueCollection mycol = new NameValueCollection(); string[] valueeach = valuelist.Split(','); int count = valueeach.Length / 8; for (int i = 0; i < count; i++) { string pnindex = valueeach[i * 8].ToString(); string typeindex = valueeach[i * 8 + 6]. 阅读全文
摘要:
declare @woidpre varchar(50);declare @DMRNoExterior varchar(50);set @woidpre='DMR'+@WOID;select top 1 @DMRNoExterior=DMRNoExterior from dbo.F_DMRExterior where WOID=@WOID order by cast(reverse(left(reverse(DMRNoExterior),charindex('-',reverse(DMRNoExterior))-1)) as int) desc;if(@DMRN 阅读全文
摘要:
sql server DDL触发器:监控数据库结构变化,并记录在 DBA_DatabaseLog表中 在每个需要监控的数据库里写建数据库触发器USE [WMS]GO/****** Object: DdlTrigger [ddlDatabaseTriggerLog] Script Date: 11/10/2012 12:21:14 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TRIGGER [ddlDatabaseTriggerLog] ON DATABASE FOR DDL_DATABASE_LEVEL_EVENTS A 阅读全文
摘要:
存储过程out传值时 SqlParameter[] paramters = { new SqlParameter("@SerialNumber", SqlDbType.VarChar, 20) }; paramters[0].Value = null; paramters[0].Direction = ParameterDirection.Output; mydbh.RunProcedureVoid("P_GetSerialNumber", paramters); return paramters[0].Value.ToString();在SQL Ser 阅读全文
摘要:
declare @eventname nvarchar(100);set @eventname=N'公告';declare @rate decimal(9,2);declare my_cursor cursor scroll dynamicfor select EventName from dbo.PM_Event;open my_cursordeclare @event nvarchar(100);fetch next from my_cursor into @eventwhile(@@fetch_status=0)beginset @rate=dbo.F_Getsimila 阅读全文
摘要:
ALTER FUNCTION [dbo].[F_GetsimilarRate](@strlist nvarchar(max),@comparelist nvarchar(max))RETURNS decimal(9,2)ASBEGINif(@strlist is null)beginreturn 0;enddeclare @count int; --计算几个相同的字declare @strlen int; --字符串的长度declare @location int; --对比到那个位置declare @strindex int; --对比字符在对方的那个位置declare @strone nv 阅读全文
摘要:
CREATE FUNCTION Split(@Text NVARCHAR(4000),@Sign NVARCHAR(4000)) RETURNS @tempTable TABLE(id INT IDENTITY(1,1) PRIMARY KEY,[VALUE] NVARCHAR(4000)) AS BEGIN DECLARE @StartIndex INT --开始查找的位置 DECLARE @FindIndex INT --找到的位置 DECLARE @Content VARCHAR(4000) --找到的值 --初始化一些变量 SET @StartIndex = 1 --T-SQ... 阅读全文