怎么往 SQL 表里插入数据,求大师帮忙,谢谢!!
让表里自动生成数据代码如下
Private Sub Command1_Click()
Dim c As Integer
Dim d As Integer
Dim e As Integer
Dim k As String
Dim i As Integer
Set rs = Nothing
c = 200
d = 200
For e = 200 To 206
e = e + 1
k = CStr(c) + "." + CStr(d) + "." + CStr(e)
For i = 0 To 255
i = i + 1
sql = "Insert into IPDB (号段,IP号) VALUES (" & k & "," & i & ")"
Set rs = SelectSQL(sql, msg)
Set Me.DataGrid1.DataSource = rs
DataGrid1.Refresh
Next
Next
End Sub