Private Sub Default__Load(ByVal Sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conn As SqlConnection = New SqlConnection("datasource=xxx;database=xxx;uid=xxx;pwd=xxx;")
Dim cmd As SqlCommand = New SqlCommand("SELECT ID FROM Table WHERE DateTimeCreated = ???????????", conn)
conn.Open()
Dim ID As String = Convert.ToString(cmd.ExecuteScalar())
conn.Close()
lblID.Text = ID
End Sub
基本上我需要一些东西来代替?????????? 带来最近创建的 ID(ID 是唯一标识符)
我敢肯定这真的很简单,尽管我可能把整个事情搞错了。