If I am correct, SP only works on SQL Server, and from what I Also know DAO doesnt support SQL Server(only Jet Databases) where as ADO supports any ODBC supported databases(through ODBC drivers), I have a FAQ on ADO if you want to see a gernal example of its usage. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
I found a solution guys, had to switch my program from DAO to ADO though, see solution below.<br><br>One other problem I was having why I wasn't being successful was that some tables weren't populated on the SQL Server database which the stored procedure was calling<br>so it would bomb out...thanx again guys.<br><br>Function StoredProc(gdate As String)<br><br>On Error GoTo ErrorHandler<br><br>Conn.BeginTrans<br>With Comm<br> .CommandText = "sp_rmvnull_inv"<br> .CommandType = adCmdStoredProc 'a constant<br> .ActiveConnection = Conn<br> .Execute ' execute the stores procedure.<br>End With<br>With Comm<br> .CommandText = "sp_run_invoices"<br> .CommandType = adCmdStoredProc 'a constant<br> .ActiveConnection = Conn<br> .Parameters.Refresh<br> .Parameters("@pub_date".Value = gdate<br> .Parameters("@pub_date".Direction = adParamInput<br> .Execute ' execute the stores procedure.<br>End With<br>Conn.CommitTrans<br><br>bDBConnectFail = False<br><br>Exit Function<br><br>ErrorHandler:<br><br>Conn.RollbackTrans<br>bDBConnectFail = True<br><br>End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.