473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SQL Serv Syntax Error or Access Violation

This one must be very simple. I am trying to run an SQL Serv 7.0 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
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

RETURN

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

Many thanks
MIke Thomas


Nov 12 '05 #1
0 2077

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: muser | last post by:
In the following function there is an access violation error, some memory can't be read. A week ago this code did compile. Can anyone possibly tell me why my compiler is unable to read part of...
7
by: Dave | last post by:
I have 2 tables, one with names, and another with addresses, joined by their CIVICID number (unique to the ADDRESSINFO table) in Oracle. I need to update a field in the NAMEINFO table for a...
1
by: Rsa Myh | last post by:
Hi, I am running SQL Server 2000 SP3 on Windows Server 2003 and since recently have a strange problem executing shape queries from COM+ components using ADO. Until 4 days ago, they worked,...
8
by: DraguVaso | last post by:
Hi, I want my application do different actions depending on the exception it gets. For exemple: I have an SQL-table with a unique index. In case I try to Insert a record that's alreaddy in it I...
4
by: Dave | last post by:
Hi, I'm running Access '03, SQL SERVER 2k on Windows XP SP1. I've not got a ton of experience in writing UDF's for t-sql. In SQL Query Analyzer, I'm trying to write a user defined scalar...
27
by: Adam Warner | last post by:
Hi all, In the code snippet below I successfully determine the address of val1:* struct o val1=l_SYM_2B(&a).o; print_aesthetic(&val1); The structure o is heavyweight. I understand...
2
by: J W | last post by:
I have an ASP page in which there is embedded SQL. I am trying to use variables in the SQL but am getting the error 'syntax error or access violation'. In the past, I have successfully used...
2
by: Nate | last post by:
I am trying to use the following IF statement, and whenever I use a single or double quote, I receive a syntax error. When using no quotes, the syntax is accepted, but the statement does not...
2
by: jthep | last post by:
I'm trying to get this piece of code I converted from C to work in C++ but I'm getting an access violation error. Problem occurs at line 61. Someone can help me with this? The function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.