Results 1 to 2 of 2

Thread: I NEED SQL HELP HERE PLEASE!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    19

    Angry

    I am able to connect using ADO and can get the results to popup on the debug window However I still can't get data to popup up on an array of Text fields. Please help

    Private Sub Command1_Click()
    Dim Conn As New ADODB.Connection
    Dim cmd As New ADODB.Command
    Dim rs As ADODB.Recordset
    Dim sConnString As String
    Dim iCtr As Integer

    sConnString = "Provider=SQLOLEDB.1;User ID=sa;password=;Initial Catalog=myfirstdatabase;Data Source = SQLDEVSRV001;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
    Conn.Open sConnString
    Set cmd.ActiveConnection = Conn
    cmd.CommandText = "SELECT name FROM mypeople WHERE name = 'Jimmy'"
    cmd.CommandType = adCmdText
    Set rs = cmd.execute

    <WHAT AM I MISSING????>

    Set rs = Nothing
    Set cmd = Nothing
    Conn.Close
    Set Conn = Nothing

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    it all looks fine, you just have to manipulate your RS now

    do that where you put:
    <WHAT AM I MISSING????>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width