Results 1 to 2 of 2

Thread: Sybase stored procedure

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    1

    Angry

    Hi all,
    I'm trying to run some stored procedures in a Sybase database within an Access database. Using ODBC Direct I create the workspace, connect to the Sybase database successfully, but from all the db objects, I can only "see" the tables. My QueryDefs colecton has 0 objects!!! And using any tool (SQL advantage, for example) I can see and run those stored procedures.
    What's wrong? Is that something Sybase specific, or I'm doing something wrong?
    Thank you very much for you quick answer (it's very urgent for me)...

    m.

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Leavenworth KS USA
    Posts
    482
    Your Access querydef doesn't populate via a making a connection; but not to worry, just call the SP you desire. If it doesn't return data, this RDO example may give you some ideas:

    Private Function DoSP(SomeDt as date, SomeVal as Integer, SomeStr as String) As Boolean
    Dim wrkMain As Workspace, cMain As Connection
    Dim rstTemp As Recordset, ConnStr As String
    Dim SQL_str As String, i As Integer
    DoSP= False
    Set wrkMain = CreateWorkspace("ODBCWorkspace", "admin", "", dbUseODBC)
    ' hint: temp nature of UID & PWD. nulls force Sybase logon prompt
    ConnStr = "ODBC;DRIVER={Sybase System 11};SRVR=[server_name];DB=[database_name];UID=" & _
    ub & ";PWD=" & mc
    Set cMain = wrkMain.OpenConnection("[database_name]", dbDriverNoPrompt, False, ConnStr)
    SQL_str = "Your_SP_NAME '" & Format(SomeDt, "General Date") & "' , " & SomeVal & ", '" & SomeStr & "'"
    cMain.Execute SQL_str
    cMain.Close: wrkMain.Close: DoSP= True
    End Function

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