wilson_ wu 30.Jun.10 10:13 PM a Web browser Connector for OLE DB All Releases Windows
Hi,
I used oledb to connect sql server 2000. Connection and statement works fine. But there is no result after execution.
Here is my code:
Dim con As New Lcconnection("oledb")
con.provider = "SQLOLEDB"
con.server = "192.168.2.5"
con.database = "test"
con.UserID = "user"
con.Password = "password"
con.Metadata = "staffs"
Dim flds As New LCFieldList
Dim keys As New LCFieldList
Dim gh As LCField
Dim count As Long
'Method 1
Set gh = keys.Append("gh", LCTYPE_TEXT)
gh.Text = '123456'
gh.Flags = LCFIELDF_KEY
con.Connect
count = con.Select(key, 1, flds)
'Method 2
Dim stm As String
stm = "select * from vstaffs"
count = con.Execute(stm, flds)
con.Disconnect
No mater which method, the count is -1 and nothing in flds excepted field name.
Thanks in advance
Wilson


No result after execute (wilson_ wu 30.Jun.10)
. . RE: No result after execute (Abhijeet V Sang... 29.Aug.10)
|