Database 版 (精华区)

发信人: wodeji (西西), 信区: Database
标  题: [转载] VB开发SQL Server数据库的打印功能(4)
发信站: 紫 丁 香 (Thu Oct  1 10:26:26 1998), 站内信件

【 以下文字转载自 Programming 讨论区 】
【 原文由 qr 所发表 】
  Private Sub TxTUidName—LostFocus() 

  UidName = TxTUidName.Text 

  End Sub 

  Private Sub TxTUidName—KeyPress(KeyAscii As Integer) 

  If KeyAscii = 13 Then 

  TxTPasWord.SetFocus 

  End If 

  End Sub 

  Private Sub TxTPasWord—LostFocus() 

   PasWord = TxTPasWord.Text 

  End Sub 

  Private Sub TxTPasWord—KeyPress(KeyAscii As Integer) 

   ’打印连接语句定义 

   Prnlog = ″DSN=SQLdaxt;UID=″ & UidName & ″;PWD=″ & PasWord & ″;DSQ=administration″ 

   ’连接数据库语句 

   DBconnect = ″ODBC;DATABASE=SQLdaxtData;DSN=SQLdaxt;UID=″ & UidName & ″;PWD=″ & PasWord &″'″ 

   On Error GoTo DBErrorHandler: 


--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: club.hit.edu.cn]
--
※ 转载:.紫 丁 香 bbs.hit.edu.cn.[FROM: cadcam.hit.edu.c]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.343毫秒