Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. database stored procedures vb and much confusion

database stored procedures vb and much confusion

Scheduled Pinned Locked Moved Visual Basic
databasequestionhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Here's my problem. I wrote a bunch of stored procedures on a sybase database and I want to be able to trigger them from vb. How do I connect to the database through vb, and how do I call a stored procedure passing in variables? I'm doing this all in a module, so no visual cover. Any ideas? :confused: ICXC NIKA

    R G T 3 Replies Last reply
    0
    • L Lost User

      Here's my problem. I wrote a bunch of stored procedures on a sybase database and I want to be able to trigger them from vb. How do I connect to the database through vb, and how do I call a stored procedure passing in variables? I'm doing this all in a module, so no visual cover. Any ideas? :confused: ICXC NIKA

      R Offline
      R Offline
      Ranjan Banerji
      wrote on last edited by
      #2

      Read up on ADO in MSDN. That is one way of doing what you need. I am assuming the appropriate drivers are available. I have never used Sybase myself but see no reason why ADO and ODBC will not let you connect. There are sevral examples in MSDN. Try: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/dasdkadooverview.asp?frame=true There are also many articles on CodeProject discussing ADO.

      1 Reply Last reply
      0
      • L Lost User

        Here's my problem. I wrote a bunch of stored procedures on a sybase database and I want to be able to trigger them from vb. How do I connect to the database through vb, and how do I call a stored procedure passing in variables? I'm doing this all in a module, so no visual cover. Any ideas? :confused: ICXC NIKA

        G Offline
        G Offline
        Giles
        wrote on last edited by
        #3

        Use a command object, or wite the SQL yourself e.g. strSQL = { CALL myStoredProcedure ('txtParam', 'numParam', #01-Jan-2002#) } If the SP returns a recordset then dim rs as new adodb.recordset rs.open strsql, cnn, ...., ....

        1 Reply Last reply
        0
        • L Lost User

          Here's my problem. I wrote a bunch of stored procedures on a sybase database and I want to be able to trigger them from vb. How do I connect to the database through vb, and how do I call a stored procedure passing in variables? I'm doing this all in a module, so no visual cover. Any ideas? :confused: ICXC NIKA

          T Offline
          T Offline
          Thesisus
          wrote on last edited by
          #4

          I have connected to Sybase from VB using DTS on MS SQL Server; the only problems i really had was datatypes. Money doesn't equal money, etc. Here is a bit of my code. It's much like connecting to any other ADO or ODBC device. Set oConn = CreateObject("ADODB.Connection") oConn.Open "Srvr=[servername];Driver={SYBASE SYSTEM 11};uid=[username];pwd=[password];" And yes you have to have the proper drivers installed on your machine to connect to sybase. Real programmers don't document. If it was hard to write, it should be hard to understand.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups