Private Sub CreateDataBase(cnDataBase as connect,sqlFile As String)
Dim strSql As String, strTmp As String
Open sqlFile For Input As #1
strSql = ""
Do While Not EOF(1)
Line Input #1, strTmp
If Left(strTmp, 3) = "f" Then strTmp = "if" & Right(strTmp, Len(strTmp) - 3)
If UCase(strTmp) = "GO" Then
cn.Execute strSql
strSql = ""
Else
strSql = strSql & strTmp & vbCrLf
End If
Loop
If strSql <> "" Then cnDataBase.Execute strSql
Close #1
End Sub
Dim strSql As String, strTmp As String
Open sqlFile For Input As #1
strSql = ""
Do While Not EOF(1)
Line Input #1, strTmp
If Left(strTmp, 3) = "f" Then strTmp = "if" & Right(strTmp, Len(strTmp) - 3)
If UCase(strTmp) = "GO" Then
cn.Execute strSql
strSql = ""
Else
strSql = strSql & strTmp & vbCrLf
End If
Loop
If strSql <> "" Then cnDataBase.Execute strSql
Close #1
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货