文件名称:数据库访问及数据转中文大写等工具
文件大小:29KB
文件格式:DLL
更新时间:2021-12-19 05:18:34
SQL访问 ACCESS访问 日期工具 字符串工具 转中文大写
DB类:数据库访问类 属性: ConnString——连接字符串(如:server=.;uid=sa;pwd=;database=ufdata_001_2010) CMDstring——未使用 oleConnString——连接ACCESS数据库的字符串 方法: OpenConn——打开数据库(无参数) oleOpenConn——打开ACCESS数据库 NoreturnCmdPara(Byval Str_cmdpara as string) 传递Sql命令为参数,无返回值 Sub PROnoreturn(ByVal Str_proName As String, Optional ByVal Str_para1 As String = "", Optional ByVal Str_para2 As String = "", Optional ByVal Str_para3 As String = "", Optional ByVal Str_para4 As String = "", Optional ByVal Str_para5 As String = "", Optional ByVal Str_para6 As String = "") 执行存储过程Str_proName,无返回值 函数: Function ReturnDatablePara(ByVal Str_cmdpara As String) as DataTable 传递Sql命令为参数,返回Datatable Function ReturnOneValuePara(ByVal Str_cmdpara As String) As Object 传递Sql命令为参数,返回单一值 Function ReturnDataReaderPara(ByVal Str_cmdpara As String) As SQlClient.SqlDataReader 传递Sql命令为参数,返回DATAREADER Function ReturnXMLPara(ByVal Str_cmdpara As String) As Xml.XmlReader 传递Sql命令为参数,返回XML Function PROReturnDataReader(ByVal Str_proName As String, Optional ByVal Date_Begin As Date = #1/1/1900#, Optional ByVal Date_End As Date = #1/1/1900#, Optional ByVal Str_SubcompanyCid As String = "", Optional ByVal Str_Code As String = "", Optional ByVal Str_CompanyCid As String = "", Optional ByVal Str_ItemCid As String = "") As SqlClient.SqlDataReader 执行存储过程Str_proName,返回DATAREADER Function PROReturnDataTable(ByVal Str_proName As String, Optional ByVal Date_Begin As Date = #1/1/1900#, Optional ByVal Date_End As Date = #1/1/1900#, Optional ByVal Str_SubcompanyCid As String = "", Optional ByVal Str_Code As String = "", Optional ByVal Str_CompanyCid As String = "", Optional ByVal Str_ItemCid As String = "") As DataTable 执行存储过程Str_proName,返回DATATABLE 以ole开头的方法,用于访问ACCESS数据库 Tools类:工具 方法: 数字转中文大写 GetMonthDateMin:取月份最小日期,表示为:2018-01-01 00:00:00 GetMonthDateMax:取月份最大日期,表示为:2018-01-01 23:59:59 GetField:返回字符值内容,如果值为NULL,则返回为“” GetFieldNum:返回数值内容,如果值为NULL,则返回0 GetFieldNumEX:返回数值内容,如果值为NULL,则返回"" GetMacList:取本机的MAC地址列表 GetMaxDate:返回日期的最大时间值 ,如:2018-01-05,则返回为:2018-01-05 23:59:59 GetMinDate:返回日期的最小时间值 GetPaperLists:返回指定打印机的纸张列表 GetPrinterLists:返回指定本机打印机列表 加密字符串:将指定的字串,按参数2和参数3计算后返回结果, 原码必须小于等 于20位,参数2只能是1-6,参数3只能是1-100 解密字符串:与加密字符串对应,返回解密后的结果