㈠ vb中數值類型佔多少位元組
VB中有多種數值類型的數據類型,見下圖:
Variant (數字) 16 個位元組 任何數字值,最大可達 Double 的范圍 。
記得引用微軟的控制項Microsoft ActoveX Date Objects 2.6 Library
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim constr As String
Dim sqlstr As String
constr = "driver={sql server};server=你的伺服器;uid=用戶名;pwd=密碼;database=資料庫"
con.ConnectionString = constr
con.Open
sqlstr = "insety into table (field,field1) values('" & text1.text & "','" & text2.text & "')"
SQLconn.Execute sqlstr