毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 医学论文 >> 正文

医生处方系统论文+源程序 第18页

更新时间:2009-5-21:  来源:毕业论文
医生处方系统论文
参考文献
1. 《Visual Basic.NET实验指导与编程实例》李印清等编著• 清华大学出版社•2006.5
2. 《Visual Basic.NET 程序设计》冯博琴,崔舒宁• 清华大学出版社•2004.8
3. 《Visual Basic.NET 程序设计》邵鹏鸣• 机械工业出版社 •2005.1
4.《Visual Basic.NET 程序设计》王学军 •  清华大学出版社•2004
5. 《Visual Basic.NET 数据库开发经典案例解析》王晟• 清华大学出版社•2005
6. 《Visual.Basic.NET控件技术教程 》张树泉 •  清华大学出版社•2004
7. 《Visual.Basic.NET入门与提高》东方人华• 清华大学出版社 •2004
8. 《SQL Server 2000 与 Visual.Basic.net数据库》东方人华• 清华大学出版社•2002
9.《数据库系统概况 》王珊 萨师煊 • 高等教育出版社•1999
10.《数据库系统概论》刘云生•华中理工大学出版社•1996.5
11.《数据库系统教程》 施伯乐• 高等教育出版社•2003.8
12.《SQL Server 2000实用教程》范立南• 清华大学出版社•2004.12
13.《SQL Server 2000系统管理员宝典》孙岩译• 清华大学出版社•2001.7
14.《SQL Server 2000管理、开发及应用实例详解》陈世洪•人民邮电出版社•2001.6
15. 《数据库系统原理及应用教程》苗雪兰,刘瑞新,宋会群• 机械工业出版社•2006.6

 

 


附录一代码
                          代码1DB SQLServer操作类
-----------------------------------------------------------------------------------------------------------------------
Imports Microsoft.VisualBasic
Imports System.Data.SqlClient
Imports System.Data
Imports System.Collections
Imports System
Imports System.Configuration
Namespace ConnSqlServer
    '通用数据库类
    Public Class db
        Private connStr As String
        Public str As String
        '默认构造函数
        Public Sub New()
            connStr = "Data Source=(local);Initial Catalog=DB;Integrated Security=True"
        End Sub
        '带参数的构造函数
        Public Sub New(ByVal Str As String)
            Try
                Me.connStr = Str
            Catch ex As Exception
                Throw ex
            End Try
        End Sub
        'Return SqlConnencion
        Function ReturnConn() As SqlConnection
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Return Conn
        End Function

        'Dispose SqlConnection
        Sub Dispose(ByVal Conn As SqlConnection)
            If (Conn IsNot DBNull.Value) Then
                Conn.Close()
                Conn.Dispose()
            End If
            GC.Collect()
        End Sub
        'Create SqlCommand 带两个参数
        Public Function CreateCmd(ByVal SQL As String, ByVal conn As SqlConnection) As SqlCommand
            Dim cmd As SqlCommand
            cmd = New SqlCommand(SQL, conn)
            Return cmd
        End Function
        'Create SqlCommand 带一个参数
        Public Function CreateCmd(ByVal SQL As String) As SqlCommand
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Dim cmd As SqlCommand
            cmd = New SqlCommand(SQL, Conn)
            Return cmd
        End Function
        ''' <summary>
        ''' 执行没有返回值的SQL语句
        ''' </summary>
        ''' <param name="SQL"></param>
        ''' <remarks></remarks>
        Public Function RunSql(ByVal SQL As String) As String
            Dim Message As String = ""
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Dim cmd As SqlCommand
            cmd = CreateCmd(SQL, Conn)
            Try
                cmd.ExecuteNonQuery()
            Catch ex As Exception
                Throw New Exception(SQL)
                Message += ex.Message
            End Try
            Dispose(Conn)
            Return Message
        End Function
        ''' <summary>
        ''' 执行SQL返回DataReader
        ''' </summary>
        ''' <param name="SQL"></param>
        ''' <returns>SqlDataReader</returns>
        ''' <remarks></remarks>
        Public Function DataReader(ByVal SQL As String) As SqlDataReader
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Dim cmd As SqlCommand
            cmd = CreateCmd(SQL, Conn)
            Dim dr As SqlDataReader
            Try
                dr = cmd.ExecuteReader(CommandBehavior.Default)
            Catch ex As Exception
                Throw New Exception(SQL)
            Finally
                'Conn.Close()
                'Conn = Nothing
                'cmd = Nothing
                'dr = Nothing
            End Try
            Return dr
        End Function
        '执行SQL返回Adapter
        Public Function Adapter(ByVal SQL As String) As SqlDataAdapter
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Dim adp As SqlDataAdapter
            adp = New SqlDataAdapter(SQL, Conn)
            Return adp
        End Function
        ''' <summary>
        '''   执行SQL返回DataSet
        ''' </summary>
        ''' <param name="SQL"></param>
        ''' <param name="ds"></param>
        ''' <returns>DataSet</returns>
        ''' <remarks></remarks>
        Public Function ReturnDataSet(ByVal SQL As String, ByRef ds As DataSet) As DataSet
            Dim Conn As SqlConnection
            Conn = New SqlConnection(connStr)
            Conn.Open()
            Dim adp As SqlDataAdapter
            adp = New SqlDataAdapter(SQL, Conn)
            Try
                adp.Fill(ds)
            Catch ex As Exception

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ... 下一页  >> 

医生处方系统论文+源程序 第18页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。