Results 1 to 2 of 2

Thread: VB6 and SQL scripts

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    1
    I need to know how to execute a stored procedure against MS SQL 7.0 using a VB6 app.
    VB6 does not recognize the GO command in stored procedures.
    Any help is appreciated.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    the simplest way (least code):

    Code:
    dim cn as connection
    dim rs as recordset
    
    set cn = new connection
    
    cn.open <connectionstringhere>
    
    set rs = cn.execute "sp_MyStoredProc 'Param1', 'Param2'"
    this executes the SP, returns a read only, forward only recordset

    Hope that helps

    Tom



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