• vb.net加本地SQL server数据库圣经


    1. Imports System.Data.SqlServerCe
    2. Public Class Form1
    3. '旧约
    4. Private Sub 创世记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 创世记ToolStripMenuItem.Click
    5. Me.selecthb("创世记")
    6. End Sub
    7. Private Sub 出埃及记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 出埃及记ToolStripMenuItem.Click
    8. Me.selecthb("出埃及记")
    9. End Sub
    10. Private Sub 利未记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 利未记ToolStripMenuItem.Click
    11. Me.selecthb("利未记")
    12. End Sub
    13. Private Sub 民数记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 民数记ToolStripMenuItem.Click
    14. Me.selecthb("民数记")
    15. End Sub
    16. Private Sub 申命记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 申命记ToolStripMenuItem.Click
    17. Me.selecthb("申命记")
    18. End Sub
    19. Private Sub 约书亚记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约书亚记ToolStripMenuItem.Click
    20. Me.selecthb("约书亚记")
    21. End Sub
    22. Private Sub 士师记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 士师记ToolStripMenuItem.Click
    23. Me.selecthb("士师记")
    24. End Sub
    25. Private Sub 路得记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 路得记ToolStripMenuItem.Click
    26. Me.selecthb("路得记")
    27. End Sub
    28. Private Sub 撒母耳记上ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 撒母耳记上ToolStripMenuItem.Click
    29. Me.selecthb("撒母耳记上")
    30. End Sub
    31. Private Sub 撒母耳记下ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 撒母耳记下ToolStripMenuItem.Click
    32. Me.selecthb("撒母耳记下")
    33. End Sub
    34. Private Sub 列王纪上ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 列王纪上ToolStripMenuItem.Click
    35. Me.selecthb("列王纪上")
    36. End Sub
    37. Private Sub 列王纪下ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 列王纪下ToolStripMenuItem.Click
    38. Me.selecthb("列王纪下")
    39. End Sub
    40. Private Sub 历代志上ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 历代志上ToolStripMenuItem.Click
    41. Me.selecthb("历代志上")
    42. End Sub
    43. Private Sub 历代志下ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 历代志下ToolStripMenuItem.Click
    44. Me.selecthb("历代志下")
    45. End Sub
    46. Private Sub 以斯拉记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 以斯拉记ToolStripMenuItem.Click
    47. Me.selecthb("以斯拉记")
    48. End Sub
    49. Private Sub 尼希米记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 尼希米记ToolStripMenuItem.Click
    50. Me.selecthb("尼希米记")
    51. End Sub
    52. Private Sub 以斯帖记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 以斯帖记ToolStripMenuItem.Click
    53. Me.selecthb("以斯帖记")
    54. End Sub
    55. Private Sub 约伯记ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约伯记ToolStripMenuItem.Click
    56. Me.selecthb("约伯记")
    57. End Sub
    58. Private Sub 诗篇ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 诗篇ToolStripMenuItem.Click
    59. Me.selecthb("诗篇")
    60. End Sub
    61. Private Sub 箴言ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 箴言ToolStripMenuItem.Click
    62. Me.selecthb("箴言")
    63. End Sub
    64. Private Sub 传道书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 传道书ToolStripMenuItem.Click
    65. Me.selecthb("传道书")
    66. End Sub
    67. Private Sub 雅歌ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 雅歌ToolStripMenuItem.Click
    68. Me.selecthb("")
    69. End Sub
    70. Private Sub 以赛亚书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 以赛亚书ToolStripMenuItem.Click
    71. Me.selecthb("以赛亚书")
    72. End Sub
    73. Private Sub 耶利米书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 耶利米书ToolStripMenuItem.Click
    74. Me.selecthb("耶利米书")
    75. End Sub
    76. Private Sub 耶利米哀歌ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 耶利米哀歌ToolStripMenuItem.Click
    77. Me.selecthb("耶利米哀歌")
    78. End Sub
    79. Private Sub 以西结书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 以西结书ToolStripMenuItem.Click
    80. Me.selecthb("以西结书")
    81. End Sub
    82. Private Sub 但以理书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 但以理书ToolStripMenuItem.Click
    83. Me.selecthb("但以理书")
    84. End Sub
    85. Private Sub 何西阿书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 何西阿书ToolStripMenuItem.Click
    86. Me.selecthb("何西阿书")
    87. End Sub
    88. Private Sub 约珥书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约珥书ToolStripMenuItem.Click
    89. Me.selecthb("约珥书")
    90. End Sub
    91. Private Sub 阿摩司书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 阿摩司书ToolStripMenuItem.Click
    92. Me.selecthb("阿摩司书")
    93. End Sub
    94. Private Sub 俄巴底亚书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 俄巴底亚书ToolStripMenuItem.Click
    95. Me.selecthb("俄巴底亚书")
    96. End Sub
    97. Private Sub 约拿书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约拿书ToolStripMenuItem.Click
    98. Me.selecthb("约拿书")
    99. End Sub
    100. Private Sub 弥迦书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 弥迦书ToolStripMenuItem.Click
    101. Me.selecthb("弥迦书")
    102. End Sub
    103. Private Sub 那鸿书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 那鸿书ToolStripMenuItem.Click
    104. Me.selecthb("那鸿书")
    105. End Sub
    106. Private Sub 哈巴谷书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 哈巴谷书ToolStripMenuItem.Click
    107. Me.selecthb("哈巴谷书")
    108. End Sub
    109. Private Sub 西番雅书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 西番雅书ToolStripMenuItem.Click
    110. Me.selecthb("西番雅书")
    111. End Sub
    112. Private Sub 哈该书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 哈该书ToolStripMenuItem.Click
    113. Me.selecthb("哈该书")
    114. End Sub
    115. Private Sub 撒迦利亚书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 撒迦利亚书ToolStripMenuItem.Click
    116. Me.selecthb("撒迦利亚书")
    117. End Sub
    118. Private Sub 玛拉基书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 玛拉基书ToolStripMenuItem.Click
    119. Me.selecthb("玛拉基书")
    120. End Sub
    121. '新约
    122. Private Sub 马太福音ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 马太福音ToolStripMenuItem.Click
    123. Me.selecthb("马太福音")
    124. End Sub
    125. Private Sub 马可福音ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 马可福音ToolStripMenuItem.Click
    126. Me.selecthb("马可福音")
    127. End Sub
    128. Private Sub 路加福音ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 路加福音ToolStripMenuItem.Click
    129. Me.selecthb("路加福音")
    130. End Sub
    131. Private Sub 约翰福音ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约翰福音ToolStripMenuItem.Click
    132. Me.selecthb("约翰福音")
    133. End Sub
    134. Private Sub 使徒行传ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 使徒行传ToolStripMenuItem.Click
    135. Me.selecthb("使徒行传")
    136. End Sub
    137. Private Sub 罗马书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 罗马书ToolStripMenuItem.Click
    138. Me.selecthb("罗马书")
    139. End Sub
    140. Private Sub 哥林多前书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 哥林多前书ToolStripMenuItem.Click
    141. Me.selecthb("哥林多前书")
    142. End Sub
    143. Private Sub 哥林多后书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 哥林多后书ToolStripMenuItem.Click
    144. Me.selecthb("哥林多后书")
    145. End Sub
    146. Private Sub 加拉太书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 加拉太书ToolStripMenuItem.Click
    147. Me.selecthb("加拉太书")
    148. End Sub
    149. Private Sub 以弗所书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 以弗所书ToolStripMenuItem.Click
    150. Me.selecthb("以弗所书")
    151. End Sub
    152. Private Sub 腓利比书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 腓利比书ToolStripMenuItem.Click
    153. Me.selecthb("腓立比书")
    154. End Sub
    155. Private Sub 歌罗西书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 歌罗西书ToolStripMenuItem.Click
    156. Me.selecthb("歌罗西书")
    157. End Sub
    158. Private Sub 帖撒罗尼迦前书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 帖撒罗尼迦前书ToolStripMenuItem.Click
    159. Me.selecthb("帖撒罗尼迦前书")
    160. End Sub
    161. Private Sub 帖撒罗尼迦后书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 帖撒罗尼迦后书ToolStripMenuItem.Click
    162. Me.selecthb("帖撒罗尼迦后书")
    163. End Sub
    164. Private Sub 提摩太前书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 提摩太前书ToolStripMenuItem.Click
    165. Me.selecthb("提摩太前书")
    166. End Sub
    167. Private Sub 提摩太后书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 提摩太后书ToolStripMenuItem.Click
    168. Me.selecthb("提摩太后书")
    169. End Sub
    170. Private Sub 提多书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 提多书ToolStripMenuItem.Click
    171. Me.selecthb("提多书")
    172. End Sub
    173. Private Sub 腓利门书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 腓利门书ToolStripMenuItem.Click
    174. Me.selecthb("腓利门书")
    175. End Sub
    176. Private Sub 希伯来书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 希伯来书ToolStripMenuItem.Click
    177. Me.selecthb("希伯来书")
    178. End Sub
    179. Private Sub 雅各书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 雅各书ToolStripMenuItem.Click
    180. Me.selecthb("玛拉基书")
    181. End Sub
    182. Private Sub 彼得前书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 彼得前书ToolStripMenuItem.Click
    183. Me.selecthb("彼得前书")
    184. End Sub
    185. Private Sub 彼得后书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 彼得后书ToolStripMenuItem.Click
    186. Me.selecthb("玛拉基书")
    187. End Sub
    188. Private Sub 约翰一书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约翰一书ToolStripMenuItem.Click
    189. Me.selecthb("约翰一书")
    190. End Sub
    191. Private Sub 约翰二书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约翰二书ToolStripMenuItem.Click
    192. Me.selecthb("约翰二书")
    193. End Sub
    194. Private Sub 约翰三书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 约翰三书ToolStripMenuItem.Click
    195. Me.selecthb("约翰三书")
    196. End Sub
    197. Private Sub 犹大书ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 犹大书ToolStripMenuItem.Click
    198. Me.selecthb("犹大书")
    199. End Sub
    200. Private Sub 启示录ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 启示录ToolStripMenuItem.Click
    201. Me.selecthb("启示录")
    202. End Sub
    203. '操作数据库
    204. Private Sub selecthb(juan As String)
    205. Dim s As String = InputBox("输入章数,开始小节,中间用空格分开")
    206. Dim sl As String() = {}
    207. Try
    208. sl = s.Split(" ")
    209. Catch ex As Exception
    210. MessageBox.Show("输入错误,请重新输入")
    211. Return
    212. End Try
    213. Me.RichTextBox1.Text = ""
    214. Using con As SqlCeConnection = New SqlCeConnection("Data Source='Database1.sdf'")
    215. Using cmd As SqlCeCommand = New SqlCeCommand("select * from t_hb where juan = @juan and zhang = @zhang and jie between @start and 1000", con)
    216. cmd.Parameters.AddWithValue("juan", juan)
    217. cmd.Parameters.AddWithValue("zhang", sl(0))
    218. cmd.Parameters.AddWithValue("start", sl(1))
    219. con.Open()
    220. Using sdr As SqlCeDataReader = cmd.ExecuteReader()
    221. Dim i As Integer = 0
    222. While sdr.Read()
    223. If i Mod 3 = 0 Then
    224. Me.RichTextBox1.SelectionColor = Color.Cyan
    225. ElseIf i Mod 3 = 1 Then
    226. Me.RichTextBox1.SelectionColor = Color.Magenta
    227. Else
    228. Me.RichTextBox1.SelectionColor = Color.Yellow
    229. End If
    230. 'Me.RichTextBox1.SelectionStart = Me.RichTextBox1.TextLength
    231. Me.RichTextBox1.AppendText(sdr("zhang") & ":" & sdr("jie") & sdr("jingwen") & Chr(13))
    232. i += 1
    233. End While
    234. End Using
    235. End Using
    236. End Using
    237. Me.RichTextBox1.Select(0, 0)
    238. Me.RichTextBox1.Focus()
    239. End Sub
    240. End Class

  • 相关阅读:
    第四代智能井盖传感器:万宾科技助力城市安全
    电子信息考研择校
    RibbonPage
    MasterAlign相机参数设置-曝光时间调节
    c# iis Oracle链接
    Mac上安装和配置Git
    JavaScript
    使用阿里云无影云电脑能干什么?
    华为ensp单臂路由及OSPF实验
    Shader Graph的用法初探
  • 原文地址:https://blog.csdn.net/www_oracle_com/article/details/134293572