|
-
May 4th, 2000, 03:02 AM
#2
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|