SQL Serv Syntax Error or Access Violation

M

Mike Thomas

This one must be very simple. I am trying to run an SCL Serv 70 stored proc
from a VBA module in an Access 2000 app. This stored proc runs fine when I
remove the parameters from the stored proc and from the COmmandText string
below, but when I run it as is I get the error above on the "Execute" line.
The connection string seems ok, it works everywhere else.

glConnCmd.CommandText = "_ContactFetchLike 'Thom%'"
glConnCmd.CommandType = adCmdStoredProc
glConnCmd.Execute
rs.Open glConnCmd

This is the stored proc:

CREATE procedure _ContactFetchLike
@strString varchar(30)
AS SELECT * FROM contact WHERE company like @strString

RETURN

It must be something pretty simple. Does any have any ideas.

Many thanks
MIke Thomas
 
M

May

Are you using .ADP or .MDB
if you are using .ADP, you may need to use an input
parameter command

May
MCP in Access and SQL Server
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top