Re: "Invalid Cursor Error"
From: Michael Gaillez (michael.gaillez_at_howest.be)
Date: 05/10/04
- Next message: SAMAY: "Two Server"
- Previous message: Steve Z: "Re: When to use Move with Restore in T-SQL"
- In reply to: Egbert Nierop \(MVP for IIS\): "Re: "Invalid Cursor Error""
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 22:37:47 +0200
"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
message news:#BisWlsNEHA.1276@TK2MSFTNGP11.phx.gbl...
> "Michael Gaillez" <michael.gaillez@howest.be> wrote in message
> news:%23Xuj6WnNEHA.1348@TK2MSFTNGP12.phx.gbl...
> > Dear,
> >
> > Does anyone have a clue when Microsoft is going to release it's next
> service
> > pack for SQL-Server? I'm running build 859 at this moment and I can't
> alter
> > any table anymore in my enterprise manager. ALTER TABLE is fine as long
as
> > you don't wish to change a column into an identity column. I do not
intend
> > to spend money on this by calling the support line, since I know what
the
> > problem is and spending money on this seems absurd. There is no kb
article
>
> 1) If they can't fix that problem, you dont have to spend money, they'll
pay
> that back.
>
Well they were nice and are going to send me the patch. I was a bit
frustrated but if they send me the fix, my problems should be over :). But a
few nightly hours searching can drive you mad every now and then; :-D
> 2) What's your code? Do you use ADO or something like that?
>
Just plain simple Enterprise Manager. I tried to work around it with the web
data administrator but that didn't work either.
> I can tell you that *no* alter table /alter column statement supports that
> natively..
> ---does *not* work
> ALTER TABLE table1 ALTER COLUMN nid ADD IDENTITY (1, 1)
>
> Therefore, I think that the 'cursor error' is raised because some
> object/component that you use, did not test this possibility and now it
bugs
> out...
>
Yep that's what I figured out as well. Enterprise Manager generates some
extra statements to support that I've read somewhere.
> 3) Having the latest ODBC / oledb drivers might help.
> Mine is 3.525.1022.0 (odbc32.dll) 2000.85.1022.0(sqloledb.dll) and so
on...
>
I will check that...
> 4)
> this below works...
>
>
> BEGIN TRANSACTION
> SET QUOTED_IDENTIFIER ON
> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
> SET ARITHABORT ON
> SET NUMERIC_ROUNDABORT OFF
> SET CONCAT_NULL_YIELDS_NULL ON
> SET ANSI_NULLS ON
> SET ANSI_PADDING ON
> SET ANSI_WARNINGS ON
> COMMIT
> BEGIN TRANSACTION
> CREATE TABLE dbo.Tmp_Table1
> (
> nID int NOT NULL IDENTITY (1, 1),
> adfs char(10) NULL
> ) ON [PRIMARY]
> GO
> SET IDENTITY_INSERT dbo.Tmp_Table1 ON
> GO
> IF EXISTS(SELECT * FROM dbo.Table1)
> EXEC('INSERT INTO dbo.Tmp_Table1 (nID, adfs)
> SELECT nID, adfs FROM dbo.Table1 TABLOCKX')
> GO
> SET IDENTITY_INSERT dbo.Tmp_Table1 OFF
> GO
> DROP TABLE dbo.Table1
> GO
> EXECUTE sp_rename N'dbo.Tmp_Table1', N'Table1', 'OBJECT'
> GO
> ALTER TABLE dbo.Table1 ADD CONSTRAINT
> PK_Table1 PRIMARY KEY CLUSTERED
> (
> nID
> ) ON [PRIMARY]
>
> GO
> COMMIT
>
I will try that as well. It's always usefull to have such workarounds.
Tnx a lot 4 your time.
yours sincerly
Michael
- Next message: SAMAY: "Two Server"
- Previous message: Steve Z: "Re: When to use Move with Restore in T-SQL"
- In reply to: Egbert Nierop \(MVP for IIS\): "Re: "Invalid Cursor Error""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|