Access violation problem
-
Guys, I have a problem with a stored proc in SQL Server 2000. I'm logged in as 'sa' so have complete access to the DB. I have a table defined as follows: CREATE TABLE Conduit ( Index_i int IDENTITY (1,1) NOT NULL Primary Key, Name_vc nvarchar(125) UNIQUE NOT NULL, StartDate_dt datetime ) GO I then have 2 stored procs that access it: CREATE PROCEDURE ReadConduitNames AS BEGIN SET NOCOUNT ON SELECT Name_vc FROM Conduit END GO and CREATE PROCEDURE ReadConduit { @Name_vc nvarchar(125) } AS BEGIN SET NOCOUNT ON SELECT * FROM Conduit WHERE Name_vc = @Name_vc END GO The first stored proc runs fine, but the second one gives the following error: [Microsoft][ODBC SQL Server Driver]Syntax error or access violation I've tried various forums and msdn, but can't find an answer as to why the second stored proc won't load. Any thoughts? Thanks in advance, John.
-
Guys, I have a problem with a stored proc in SQL Server 2000. I'm logged in as 'sa' so have complete access to the DB. I have a table defined as follows: CREATE TABLE Conduit ( Index_i int IDENTITY (1,1) NOT NULL Primary Key, Name_vc nvarchar(125) UNIQUE NOT NULL, StartDate_dt datetime ) GO I then have 2 stored procs that access it: CREATE PROCEDURE ReadConduitNames AS BEGIN SET NOCOUNT ON SELECT Name_vc FROM Conduit END GO and CREATE PROCEDURE ReadConduit { @Name_vc nvarchar(125) } AS BEGIN SET NOCOUNT ON SELECT * FROM Conduit WHERE Name_vc = @Name_vc END GO The first stored proc runs fine, but the second one gives the following error: [Microsoft][ODBC SQL Server Driver]Syntax error or access violation I've tried various forums and msdn, but can't find an answer as to why the second stored proc won't load. Any thoughts? Thanks in advance, John.
replace
jgrogan wrote:
CREATE PROCEDURE ReadConduit { @Name_vc nvarchar(125) }
with
CREATE PROCEDURE ReadConduit ( @Name_vc nvarchar(125) )
for more info check this google result[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you."
-
replace
jgrogan wrote:
CREATE PROCEDURE ReadConduit { @Name_vc nvarchar(125) }
with
CREATE PROCEDURE ReadConduit ( @Name_vc nvarchar(125) )
for more info check this google result[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you."
-
replace
jgrogan wrote:
CREATE PROCEDURE ReadConduit { @Name_vc nvarchar(125) }
with
CREATE PROCEDURE ReadConduit ( @Name_vc nvarchar(125) )
for more info check this google result[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you."
Rename you to Eagle Eyes - well done
Never underestimate the power of human stupidity RAH
-
Rename you to Eagle Eyes - well done
Never underestimate the power of human stupidity RAH