摘要:
'空值判斷 If IsDBNull(DataGridView1.Item(1, 1).Value) = True Then DataGridView1.Item(1, 1).Value = "空值" End If '删除所有行 DataGridView1.Rows.Clear() '删除第一行 Da 阅读全文
摘要:
Excel2007添加引用Microsoft Excel 12.0 library object '導入命名空間 Imports Microsoft.Office.Interop Private Sub A1() '導出Excel Dim Xls As Excel.Application = New 阅读全文
摘要:
'導入命名空間Imports System.Data.OleDb '定義變量 Dim Sql As String 'OleDb連線 Dim SqlAC As OleDbConnection Dim CmdAC As OleDbCommand Dim drAC As OleDbDataReader ' 阅读全文
摘要:
Imports Oracle.DataAccess.Client '導入命名空間 Public Class Form1 Dim Sql As String Public SqlTP As OracleConnection = New OracleConnection("Password= ""密碼" 阅读全文
摘要:
Function MD5(ByVal strSource As String, ByVal Code As Int16) As String'使用MD5加密 Dim dataToHash As Byte() = (New System.Text.ASCIIEncoding).GetBytes(str 阅读全文
摘要:
'導入命名空間Imports System.Data.SqlClient '定義變量 Dim Sql As String 'SQL字串 Dim Sqlado As SqlConnection '连接数据库 Dim CmdVB As SqlCommand '对数据源执行SQL命令并返回数据 Dim d 阅读全文