'連接SQL SERVER
private sub form_load()
dim g_cn As New ADODB.Connection
dim strsql as string
If g_cn.State = adStateOpen Then g_cn.Close
With g_cn
.Provider = "sqloledb"
.ConnectionString = "data source=L1;initial catalog=HK;user id=sa;password="
.Open
End With
strsql="Insert into Temp (Desc,Cont) values('description','Content')"
'插入新數據
g_cn.execute(strsql)
end sub