RANDALL R ANTHONY
RRANTHON at sentara.com
Tue May 3 11:00:21 CDT 2011
Off the top of my head... Exec sp_name 123 is the syntax for executing/passing one number parameter for an SP. Maybe your line needs to have the variable inside the double quotes in some manner. conTest.Execute "EXEC sp_Add_FutureServicesOrders_byRoute" & RTE -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Tuesday, May 03, 2011 10:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A97 SQL Server It's been a long time, but I don't think it will work to try to specify the name of the stored procedure using a variable like that. Someone else can correct me if I'm having a senior moment. Charlotte Foust On Apr 28, 2011 8:19 AM, "b heygood" <bheygood at abestsystems.com> wrote: > having a "ODBC - Call failed" message from A97 when running the code below. > RTE is a long var. > code generates no errors up to the last line. > I can link to tables using the log on info and password successfully. > > any ideas?? > > > > 'populate the object variables > Set wkTest = CreateWorkspace("ODBCWorkspace", "admin", "", dbUseODBC) > Set conTest = wkTest.OpenConnection("CONNECTION", dbDriverNoPrompt, True, > CONNECT_STR) > conTest.QueryTimeout = 0 > > 'Execute the stored procedure (SQL Server 7.0) > DoEvents > conTest.Execute "EXEC sp_Add_FutureServicesOrders_byRoute" & RTE > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com