Results 1 to 4 of 4

Thread: SQL Stored procs from VB application

  1. #1
    Guest

    Question

    Hi,

    Is it possibly to execute SQL stored procedures with parameters from VB application?

    Thank you.

  2. #2
    Guest
    Hello there,

    I found this in the MSDN online help at MS. From the KB #Q174223
    Code:
    Cmd1.ActiveConnection = Conn1
    Cmd1.CommandText = "sp_AdoTest"
    Cmd1.CommandType = adCmdStoredProc
    Cmd1.Parameters.Refresh
    Cmd1.Parameters(1).Value = 10
    Hope this helps

  3. #3
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    Yes it is. You can use ADO Command and Parameter objects. I have examples of it at work, but basically what you do is set your parameters, append them to the Command object and then execute. You can also execute a stored procedure from a Connection object using "Connection.Execute SQLStatement" where the SQLStatment is an execution of the stored procedure just like you would do in SQL Server 7. (Exec spp_insert_master @Variable1 = FirstInput, @Variable2 = SecondInput, etc.)

    Damonous

  4. #4
    New Member
    Join Date
    Dec 1999
    Location
    India
    Posts
    9
    You can also use UserConnection object to execute the stored procedures if u are using RDO.

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