SQL Server 2000 data fetching
is there another way of calling a stored procedure in a SQL Server 2000 using a Visual Basic 6 IDE?.
I'm currently using a method to call a stored procedure in sql Server 2000 through ADODB to get the Recordsets.
**********************************************
Here is a sample code of what closely my code looks like!.
************************************************** *
Private Sub cmd_get_Click()
str_empid = txt_empid.Text
Set cmd = New ADODB.Command
cmd.ActiveConnection = con
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "empdetails"
cmd.Parameters.Append cmd.CreateParameter("empid", adVarChar, adParamInput, 6, str_empid)
Set rs = cmd.Execute
If Not rs.EOF Then
txt_firstname = rs.Fields(0)
txt_title = rs.Fields(1)
txt_address = rs.Fields(2)
End If
Set cmd.ActiveConnection = Nothing
End Sub
Plss... i do need other opinions if there is another way of getting data from sq server 2000 i know something about SQLDMO ...
i need some help in my project.. thankss....
|