By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

SQL Serv Syntax Error or Access Violation

P: n/a
This one must be very simple. I am trying to run an SQL Serv 7.0 stored
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
SQL Serv Syntax Error or Access Violation

on the "Execute" line. _ContactFetchLike 'Thom%' also works when I run it
from the Query Analyser.

The connection string seems ok, it works everywhere else.

glConnCmd.CommandText = "_ContactFetchLike 'Thom%'"
glConnCmd.CommandType = adCmdStoredProc
glConnCmd.Execute '' error on this line
rs.Open glConnCmd

This is the stored proc:

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


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

Many thanks
MIke Thomas

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.