求教:sqlconnect 的用法。。。。 看了帮助还不很明白
请指点一下sqlconnect 函数的用法,看了帮助但还是不明白。。。。例子,希望能对你有所帮助
Sub MainDim errors(1 To 3, 1 To 10)As Variant
Dim outputStr As String
Dim connection As Long
Dim prompt As Integer
Dim connect_str as string
Dim retcode as long
connection = -1
connect_str = "DSN=TestData;DBQ=C:\SQATemplates\testdata.mdb;"
connection = SQLOpen(connect_str, outputStr, prompt:=3)
if connection < 0 then
SQLError destination:=errors
Msgbox "The SQLOpen was in unsuccessful due to error. connection= "&CStr(connection)&" Description= "&CStr(errors(1,3))
Exit Sub
end if
retcode = SQLClose(connection)
MsgBox "Your connect string is: "&Cstr(outputStr)
stop
End Sub 说清楚是哪不明白嘛,要不别人怎么帮你呀?
怪我没讲清楚,我想在VU中测数据库,但对vu中的“sqlconnect”看不太懂
怪我没讲清楚,我想在VU中测数据库,但对vu中的“sqlconnect”函数看不太懂。。能在讲讲在vu中如何联数据库吗??
谢谢。。。。
页:
[1]