zoukankan      html  css  js  c++  java
  • 查询sql 并且读取

      






    //显示地址 //VBSBegin // Set obj = GetObject("winmgmts:\. ootcimv2") // Set IPConfigSet = obj.ExecQuery ("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") // For Each IPConfig in IPConfigSet // If Not IsNull(IPConfig.IPAddress) Then // For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress) // add = IPConfig.IPAddress(i) // MessageBox add // Next // End If // Next //VBSEnd //显示气泡提示信息 Sub neirong If Plugin.SQLServer.Connect("127.0.0.1,1433", "sa", "Aa3321965", "moge") Then //Call Plugin.Msg.Tips("连接成功啦") //连接SQLServer数据库 End If // //SELECT TOP 1000 [R_gonghao] // ,[R_bianma] // ,[R_xingming] // ,[R_sex] // ,[R_dianhua] // ,[R_bumen] // ,[R_kahao] // FROM [moge].[dbo].[renyuan] //查询SQLServer数据库 Reta = Plugin.SQLServer.SelectData("renyuan", "R_gonghao","R_gonghao<600") //Call Plugin.File.WriteFileEx("C:第一个.txt",Reta) //MessageBox Retab dim MyArray MyArray = Split(Reta, "|") // UBound(MyArray)查出来数据有几个 //直接读取 //Call Plugin.Msg.Tips( Cstr(MyArray(2))) //一行一行读取------------------------------------------------- If UBound(MyArray)>=0 Then i=0 For UBound(MyArray) //下面这句是得到文本内容 SayString Cstr(MyArray(i)) Delay 10 //替换# MyArray(i) = replace(MyArray(i), "#", "") Delay 10 //Msgbox "成功输入第 " & i + 1 & " 行文本内容为:" & Cstr(MyArray(i)) //Call Plugin.File.WriteFileEx("C:第一个.txt", Cstr(MyArray(i))) Call Lib.模拟表格.表格_置内容("1",1,i+1,MyArray(i)) Delay 10 i=i+1 Next End If End sub Event Form1.Button1.Click call Lib.模拟表格.表格_创建(Form1.Hwnd,"1",0,0,100,25,10,20) End Event Event Form1.Button2.Click Call Lib.模拟表格.表格_删除("1") End Event Event Form1.Button3.Click Call neirong End Event

      

    博客园:冷色008 百度:冷色008
  • 相关阅读:
    Hibernate+JPA (EntityMange讲解)
    JPA和Hibernate的区别
    Hibernate与Jpa的关系,终于弄懂
    JEE学习线路
    J2EE中你必须了解的13种技术规范
    js设置datagriad的行移动
    js正则表达式中的特殊字符
    iOS 开发之动画篇
    Phone APP设计规范/iPad APP设计规范/Android APP设计规范/网页设计规范
    打包程序时的证书问题(上传APP就出现Missing iOS Distribution signing indetity for)
  • 原文地址:https://www.cnblogs.com/--3q/p/5531478.html
Copyright © 2011-2022 走看看