|
Posted by Erland Sommarskog on 11/24/59 11:29
RS200Phil (philsowden@dataservicesltd.co.uk) writes:
> I've spent hours trying to find the error in the following SQL 2000
> command:
>
> ALTER TABLE [ClientList] ADD CONSTRAINT [PK_ClientList] PRIMARY KEY
> CLUSTERED ([PhoneNo]) On [PRIMARY]
>
> Every time I try to "Execute" this from my (VB5) ODBC connection I get:
>
> Runtime error 3289;
> Syntax error in CONSTRAINT clause
>
> For the life of me I can see nothing wrong. I used Enterprise manager
> to create this statement, and I can create the primary key fine from
> there. The PhoneNo field does not allow NULLs.
That appears to be an error from the client layer. There certainly is
no syntax error in that statement as far as SQL Server is concerned, as
I can see. (Run in Query Analyzer to verify.)
Could you post the actual VB code you are using? Please also include
the part where you connect.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|