vb与server 2000连接,代码是书上的,怎么连不上
Public objconnection As New adodb.ConnectionPublic objrecordset As New adodb.Recordset
Sub main()
objconnection.ConnectionString = "provider=sqloledb.1;persist security info=false;user id=sa;initial catalog=hang card ;data source=(local)"
objconnection.Open
frmmain.Show
End Sub
Public Sub execute(spl As String)
objconnection.execute spl
End Sub
Public Sub records(sql As String)
Set objrecordset = objconnection.execute(sql)
End Sub
这段代码是书上的,为什么显示用户sa登录失败,或是 连接失败什么的,求高手指点