Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 21st, 2008, 09:05 AM
Registered User
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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....








Similar Threads
Thread Thread Starter Forum Replies Last Post
How to shrink data files in SQL Server 2000 chintan SQL Server 2000 6 October 15th, 2008 01:58 PM
Insert data row in SQL SERVER 2000 dimeanel ADO.NET 1 January 25th, 2006 09:32 AM
How to export SQL Server 2000 data in kwilliams XML 13 November 30th, 2005 10:20 AM
Export data in conditions - SQL server 2000 minhpx SQL Server 2000 1 March 19th, 2005 01:45 AM
Data Shaping In SQL Server 2000 nidgep SQL Server ASP 5 August 29th, 2003 03:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.