Showing posts with label invalid. Show all posts
Showing posts with label invalid. Show all posts

Friday, March 16, 2012

"System.InvalidOperationException: Invalid attempt to MetaData when reader is closed"

I am getting this exception sporadically in a certain block of code (it usually works):

"System.InvalidOperationException: Invalid attempt to MetaData when reader is closed"

The code is below: cmd.CommandText ="[dbo].CountryGetList"; cmd.CommandType = CommandType.StoredProcedure; IDataReader rdr = cmd.ExecuteReader(); List countries =new List(); ...while (rdr.Read()) {//do stuff                  

CountryID = (

Guid)rdr["CountryID"];

//blows up on the next line

cty.Name = (string)rdr["Name"];

}

} rdr.Close();

Any ideas!?

I guess thecmd.Connection has been closed before you finish reading data from IDataReader rdr

Friday, February 24, 2012

"Invalid Object.." error when using Copy SQL Server Objects task

SQL Server 2000. I have a production database, of which, I want to
make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
all objects from MyDbName to MyDbName_Test (on the same instance of SQL
Server). I've used this method on other databases many times and it
completes just fine. On this db, however, I get "Invalid object name
'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
course, one of my views. This view functions properly when ran. I
later found that the error seemed to be happening when the DTS attempts
to copy another view that calls vwWhereUsed. This other view does not
get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
copied.
My thought was that the other view is being copied to the new db before
vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
from what I just explained, that doesn't seem to be the case.
On another DTS attempt to move a few tables,that have nothing to do
with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
same error message (Invalid object name 'dbo.vwWhereUsed').
Interestingly enough, if I UNcheck the "Drop Destination Objects First"
option before moving those tables, the error does not occur. This does
not make sense, because it was a NEW db.. there was nothing to DROP.
Is there something I'm not seeing here? or..
Is there techniques to help me discover exactly whats happening.. or
any tips on making copies of databases using the Copy SQL Server Object
Task that may help correct this issue?
TIALindsey,
Seems like a lot of unnecessary work. Why not use a BACKUP/RESTORE
approach? Or if the DB can be offline (say afterhours)
sp_detach_db/sp_attach_db?
HTH
Jerry
"lindseyhansen" <lindsey.hansen@.fmc-na.com> wrote in message
news:1128614409.695658.177570@.o13g2000cwo.googlegroups.com...
> SQL Server 2000. I have a production database, of which, I want to
> make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
> all objects from MyDbName to MyDbName_Test (on the same instance of SQL
> Server). I've used this method on other databases many times and it
> completes just fine. On this db, however, I get "Invalid object name
> 'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
> course, one of my views. This view functions properly when ran. I
> later found that the error seemed to be happening when the DTS attempts
> to copy another view that calls vwWhereUsed. This other view does not
> get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
> copied.
> My thought was that the other view is being copied to the new db before
> vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
> from what I just explained, that doesn't seem to be the case.
> On another DTS attempt to move a few tables,that have nothing to do
> with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
> same error message (Invalid object name 'dbo.vwWhereUsed').
> Interestingly enough, if I UNcheck the "Drop Destination Objects First"
> option before moving those tables, the error does not occur. This does
> not make sense, because it was a NEW db.. there was nothing to DROP.
>
> Is there something I'm not seeing here? or..
> Is there techniques to help me discover exactly whats happening.. or
> any tips on making copies of databases using the Copy SQL Server Object
> Task that may help correct this issue?
> TIA
>|||Thanks Jerry.. I haven't tried that before.. I'll give it a shot. It
still makes me nervous, however, that I can't get the dts to complete
successfully. I've run the dbcc check on the database and everything
is fine. I'm not sure what else to look at.
Thanks, though.

"Invalid Object.." error when using Copy SQL Server Objects task

SQL Server 2000. I have a production database, of which, I want to
make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
all objects from MyDbName to MyDbName_Test (on the same instance of SQL
Server). I've used this method on other databases many times and it
completes just fine. On this db, however, I get "Invalid object name
'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
course, one of my views. This view functions properly when ran. I
later found that the error seemed to be happening when the DTS attempts
to copy another view that calls vwWhereUsed. This other view does not
get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
copied.
My thought was that the other view is being copied to the new db before
vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
from what I just explained, that doesn't seem to be the case.
On another DTS attempt to move a few tables,that have nothing to do
with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
same error message (Invalid object name 'dbo.vwWhereUsed').
Interestingly enough, if I UNcheck the "Drop Destination Objects First"
option before moving those tables, the error does not occur. This does
not make sense, because it was a NEW db.. there was nothing to DROP.
Is there something I'm not seeing here? or..
Is there techniques to help me discover exactly whats happening.. or
any tips on making copies of databases using the Copy SQL Server Object
Task that may help correct this issue?
TIA
Lindsey,
Seems like a lot of unnecessary work. Why not use a BACKUP/RESTORE
approach? Or if the DB can be offline (say afterhours)
sp_detach_db/sp_attach_db?
HTH
Jerry
"lindseyhansen" <lindsey.hansen@.fmc-na.com> wrote in message
news:1128614409.695658.177570@.o13g2000cwo.googlegr oups.com...
> SQL Server 2000. I have a production database, of which, I want to
> make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
> all objects from MyDbName to MyDbName_Test (on the same instance of SQL
> Server). I've used this method on other databases many times and it
> completes just fine. On this db, however, I get "Invalid object name
> 'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
> course, one of my views. This view functions properly when ran. I
> later found that the error seemed to be happening when the DTS attempts
> to copy another view that calls vwWhereUsed. This other view does not
> get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
> copied.
> My thought was that the other view is being copied to the new db before
> vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
> from what I just explained, that doesn't seem to be the case.
> On another DTS attempt to move a few tables,that have nothing to do
> with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
> same error message (Invalid object name 'dbo.vwWhereUsed').
> Interestingly enough, if I UNcheck the "Drop Destination Objects First"
> option before moving those tables, the error does not occur. This does
> not make sense, because it was a NEW db.. there was nothing to DROP.
>
> Is there something I'm not seeing here? or..
> Is there techniques to help me discover exactly whats happening.. or
> any tips on making copies of databases using the Copy SQL Server Object
> Task that may help correct this issue?
> TIA
>
|||Thanks Jerry.. I haven't tried that before.. I'll give it a shot. It
still makes me nervous, however, that I can't get the dts to complete
successfully. I've run the dbcc check on the database and everything
is fine. I'm not sure what else to look at.
Thanks, though.

"Invalid Object.." error when using Copy SQL Server Objects task

SQL Server 2000. I have a production database, of which, I want to
make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
all objects from MyDbName to MyDbName_Test (on the same instance of SQL
Server). I've used this method on other databases many times and it
completes just fine. On this db, however, I get "Invalid object name
'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
course, one of my views. This view functions properly when ran. I
later found that the error seemed to be happening when the DTS attempts
to copy another view that calls vwWhereUsed. This other view does not
get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
copied.
My thought was that the other view is being copied to the new db before
vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
from what I just explained, that doesn't seem to be the case.
On another DTS attempt to move a few tables,that have nothing to do
with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
same error message (Invalid object name 'dbo.vwWhereUsed').
Interestingly enough, if I UNcheck the "Drop Destination Objects First"
option before moving those tables, the error does not occur. This does
not make sense, because it was a NEW db.. there was nothing to DROP.
Is there something I'm not seeing here? or..
Is there techniques to help me discover exactly whats happening.. or
any tips on making copies of databases using the Copy SQL Server Object
Task that may help correct this issue?
TIALindsey,
Seems like a lot of unnecessary work. Why not use a BACKUP/RESTORE
approach? Or if the DB can be offline (say afterhours)
sp_detach_db/sp_attach_db?
HTH
Jerry
"lindseyhansen" <lindsey.hansen@.fmc-na.com> wrote in message
news:1128614409.695658.177570@.o13g2000cwo.googlegroups.com...
> SQL Server 2000. I have a production database, of which, I want to
> make a copy. I created a DTS with the Copy SQL Server Obj Task to copy
> all objects from MyDbName to MyDbName_Test (on the same instance of SQL
> Server). I've used this method on other databases many times and it
> completes just fine. On this db, however, I get "Invalid object name
> 'dbo.vwWhereUsed'" when trying to complete the task. vwWhereUsed is, of
> course, one of my views. This view functions properly when ran. I
> later found that the error seemed to be happening when the DTS attempts
> to copy another view that calls vwWhereUsed. This other view does not
> get copied to MyDbName_Test before the DTS fails, but vwWhereUsed is
> copied.
> My thought was that the other view is being copied to the new db before
> vwWhereUsed and blowing up because vwWhereUsed is not there yet... but
> from what I just explained, that doesn't seem to be the case.
> On another DTS attempt to move a few tables,that have nothing to do
> with vwWhereUsed, into a new clean database (MyDBName_Test) I got the
> same error message (Invalid object name 'dbo.vwWhereUsed').
> Interestingly enough, if I UNcheck the "Drop Destination Objects First"
> option before moving those tables, the error does not occur. This does
> not make sense, because it was a NEW db.. there was nothing to DROP.
>
> Is there something I'm not seeing here? or..
> Is there techniques to help me discover exactly whats happening.. or
> any tips on making copies of databases using the Copy SQL Server Object
> Task that may help correct this issue?
> TIA
>|||Thanks Jerry.. I haven't tried that before.. I'll give it a shot. It
still makes me nervous, however, that I can't get the dts to complete
successfully. I've run the dbcc check on the database and everything
is fine. I'm not sure what else to look at.
Thanks, though.

"Invalid object format name" Error

Hi there,

I am trying to upgrade a crystal application from VS.Net 2003 to VS.Net 2005. Some of the reports work just fine in the new enviroment. But one of the reports does give me a hard time.

It is a little complicated, so please bare with me. The report uses a c# derived DataSet class as its Database Fields source. It also uses a DataTable as its data source. When I try to bind the report with the data source, for example, myReport.setDataSource(myDataTable);. It throws the following exception:

CrystalDecisions.CrystalReports.Engine.InternalException was unhandled by user code
Message="\rError in File C:\\WINDOWS\\TEMP\\temp_c2eb4661-c3c0-429a-9d9f-c0b280e112bc {645E2563-B9C6-4A6F-9714-618DF7CB1EE2}.rpt:\nInvalid object format name."
Source="CrystalDecisions.ReportAppServer.DataSetConversion"
StackTrace:
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable)
at NL2.Web.GlRptFsWModule.getReport(Boolean sendToPrinter, exportTo eExport) in c:\Inetpub\wwwroot\NL2\Web\reports\GlRptFsWModule.ascx.cs:line 900
at NL2.Web.GlRptFsWModule.cViewButton_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\NL2\Web\reports\GlRptFsWModule.ascx.cs:line 1246
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I traced the program and realized that once I change the format of the FieldObject and call the report object's refresh() method, the same exception is thrown. For example:

myReport.Refresh(); // ok here
myFiledObject.Width = 0;
myReport.Refresh(); // throw exception

I also tried to reset all the FieldFormat for the FieldObject, but the same thing happen. Once I change the FieldFormat and refresh, it throws an exception. I am so confused now!

myReport.Refresh(); // ok here
myFiledObject.FieldFormat.BooleanFormat.OutputType = BooleanOutputType.TrueOrFalse;
myReport.Refresh(); // throw exception

Can any crystal report expert/genius give me some hints on what did I do wrong or what could be the problem? Thanks in Advance!If possible, use verify database option and check whether it is connected to the server properly

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanks
use sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanksuse sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution
command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication
that
couldn't be send to the subscriber becouse of the above error.
Thanks
Please enable logging as per this article:
http://support.microsoft.com/?id=312292 to get more details about the
failing command.
sp_browsereplcmds could also be used to find these details.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanks
use sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanksuse sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid Cursor State" - REPOST

MS-SQL 2000, Service Pack 3a and 4
I have customers that are starting to get "Invalid Cursor State" messages
returned from my Clarion MS-SQL. based application.
It appears to happen when i am issuing a "SELECT SUM(TOTAL) FROM..."
statement, but i can be sure of that. I cant pinpoint when the problem
starts. The solution has been to close the screen im on, which closes
connection to the database.
Where can i start to look for this problem?
TIA
Tim MorrisonTim Morrison wrote:
> I have customers that are starting to get "Invalid Cursor State"
> messages returned from my Clarion MS-SQL. based application.
>
Tried reading this article?
http://support.microsoft.com/kb/831997
- Peter
--
Hi! I'm a .signature *virus*!
Copy me into your ~/.signature to help me spread!|||Yup. SP4 is applied to the machine giving me the most problems. It does
however happen to SP3a machines as well.
Tim
"Peter Lykkegaard" <plykkegaard@.nospam.nospam> wrote in message
news:eZOsIYKPHHA.1248@.TK2MSFTNGP02.phx.gbl...
> Tim Morrison wrote:
>> I have customers that are starting to get "Invalid Cursor State"
>> messages returned from my Clarion MS-SQL. based application.
> Tried reading this article?
> http://support.microsoft.com/kb/831997
> - Peter
> --
> Hi! I'm a .signature *virus*!
> Copy me into your ~/.signature to help me spread!
>

Thursday, February 23, 2012

"Invalid Cursor State" - REPOST

MS-SQL 2000, Service Pack 3a and 4
I have customers that are starting to get "Invalid Cursor State" messages
returned from my Clarion MS-SQL. based application.
It appears to happen when i am issuing a "SELECT SUM(TOTAL) FROM..."
statement, but i can be sure of that. I cant pinpoint when the problem
starts. The solution has been to close the screen im on, which closes
connection to the database.
Where can i start to look for this problem?
TIA
Tim Morrison
Yup. SP4 is applied to the machine giving me the most problems. It does
however happen to SP3a machines as well.
Tim
"Peter Lykkegaard" <plykkegaard@.nospam.nospam> wrote in message
news:eZOsIYKPHHA.1248@.TK2MSFTNGP02.phx.gbl...
> Tim Morrison wrote:
> Tried reading this article?
> http://support.microsoft.com/kb/831997
> - Peter
> --
> Hi! I'm a .signature *virus*!
> Copy me into your ~/.signature to help me spread!
>

"Invalid Cursor State" - REPOST

MS-SQL 2000, Service Pack 3a and 4
I have customers that are starting to get "Invalid Cursor State" messages
returned from my Clarion MS-SQL. based application.
It appears to happen when i am issuing a "SELECT SUM(TOTAL) FROM..."
statement, but i can be sure of that. I cant pinpoint when the problem
starts. The solution has been to close the screen im on, which closes
connection to the database.
Where can i start to look for this problem?
TIA
Tim MorrisonTim Morrison wrote:

> I have customers that are starting to get "Invalid Cursor State"
> messages returned from my Clarion MS-SQL. based application.
>
Tried reading this article?
http://support.microsoft.com/kb/831997
- Peter
Hi! I'm a .signature *virus*!
Copy me into your ~/.signature to help me spread!|||Yup. SP4 is applied to the machine giving me the most problems. It does
however happen to SP3a machines as well.
Tim
"Peter Lykkegaard" <plykkegaard@.nospam.nospam> wrote in message
news:eZOsIYKPHHA.1248@.TK2MSFTNGP02.phx.gbl...
> Tim Morrison wrote:
>
> Tried reading this article?
> http://support.microsoft.com/kb/831997
> - Peter
> --
> Hi! I'm a .signature *virus*!
> Copy me into your ~/.signature to help me spread!
>

"Invalid Cursor Error"

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
for that error as well(although it's is fixed in higher builds than 859) so
there is a big chance they don't want to give me a higher build because of
that (at least that is what appears from other articles). Anyone who can
help me? My development time reduces drastically and reinstalling isn't an
option!
yours sincerly
Michael
"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.
2) What's your code? Do you use ADO or something like that?
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...
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...
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

> for that error as well(although it's is fixed in higher builds than 859)
so
> there is a big chance they don't want to give me a higher build because of
> that (at least that is what appears from other articles). Anyone who can
> help me? My development time reduces drastically and reinstalling isn't an
> option!
> yours sincerly
> Michael
>
|||"Egbert Nierop (MVP for IIS)" <egbert_nierop@.nospam.invalid> wrote in
message news:#BisWlsNEHA.1276@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> "Michael Gaillez" <michael.gaillez@.howest.be> wrote in message
> news:%23Xuj6WnNEHA.1348@.TK2MSFTNGP12.phx.gbl...
> service
> alter
as[vbcol=seagreen]
intend[vbcol=seagreen]
the[vbcol=seagreen]
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

"Invalid Cursor Error"

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
for that error as well(although it's is fixed in higher builds than 859) so
there is a big chance they don't want to give me a higher build because of
that (at least that is what appears from other articles). Anyone who can
help me? My development time reduces drastically and reinstalling isn't an
option!
yours sincerly
Michael"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.
2) What's your code? Do you use ADO or something like that?
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...
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...
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

> for that error as well(although it's is fixed in higher builds than 859)
so
> there is a big chance they don't want to give me a higher build because of
> that (at least that is what appears from other articles). Anyone who can
> help me? My development time reduces drastically and reinstalling isn't an
> option!
> yours sincerly
> Michael
>|||"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...
> service
> alter
as[vbcol=seagreen]
intend[vbcol=seagreen]
the[vbcol=seagreen]
article[vbcol=seagreen]
> 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

Sunday, February 19, 2012

"Invalid Cursor Error"

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
for that error as well(although it's is fixed in higher builds than 859) so
there is a big chance they don't want to give me a higher build because of
that (at least that is what appears from other articles). Anyone who can
help me? My development time reduces drastically and reinstalling isn't an
option!
yours sincerly
Michael"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.
2) What's your code? Do you use ADO or something like that?
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...
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...
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
> for that error as well(although it's is fixed in higher builds than 859)
so
> there is a big chance they don't want to give me a higher build because of
> that (at least that is what appears from other articles). Anyone who can
> help me? My development time reduces drastically and reinstalling isn't an
> option!
> yours sincerly
> Michael
>|||"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

"Invalid command option D."

When trying to start SQL 2000 from dos prompt.
I changed the start up locations -D -L -E for my server from EM
server properties, Moved the Data and log files (MDF and LDFs), then tried
to
restart the server and it failed. I duplicated all files to their original
locations,
and again tried to restart from command-line with -d -l but nothing works...
When I changed the Server Properties I used capital D, and when I try to
start
SQL from DOS I get "Invalid command option D."
Please help me !! what Have I done to myself
Does anyone have any idea what I need to do to get this server backup'
Thanks!!WANNABE wrote:
> When trying to start SQL 2000 from dos prompt.
> I changed the start up locations -D -L -E for my server from EM
> server properties, Moved the Data and log files (MDF and LDFs), then tried
> to
> restart the server and it failed. I duplicated all files to their original
> locations,
> and again tried to restart from command-line with -d -l but nothing works...
> When I changed the Server Properties I used capital D, and when I try to
> start
> SQL from DOS I get "Invalid command option D."
> Please help me !! what Have I done to myself
> Does anyone have any idea what I need to do to get this server backup'
> Thanks!!
>
What is the EXACT command, including switches, that you are running from
the DOS prompt?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||You need to put back the model database to where it used to be. The reference to the model database
is *inside* master.mdf. SQL Server cannot start without model since it cannot create tempdb, and SQL
Server cannot live without tempdb. You probably want to do the same for msdb, and other user
database, but those will not prohibit SQL Server from starting. You really should read KB 224071
first... :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
> When trying to start SQL 2000 from dos prompt.
> I changed the start up locations -D -L -E for my server from EM
> server properties, Moved the Data and log files (MDF and LDFs), then tried to
> restart the server and it failed. I duplicated all files to their original locations,
> and again tried to restart from command-line with -d -l but nothing works...
> When I changed the Server Properties I used capital D, and when I try to start
> SQL from DOS I get "Invalid command option D."
> Please help me !! what Have I done to myself
> Does anyone have any idea what I need to do to get this server backup'
> Thanks!!
>|||Thanks, but I do have all dbs in both places, and it still wont start. I
try "sqlservr" and it returns the "Invalid command option D."
error
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
> You need to put back the model database to where it used to be. The
> reference to the model database is *inside* master.mdf. SQL Server cannot
> start without model since it cannot create tempdb, and SQL Server cannot
> live without tempdb. You probably want to do the same for msdb, and other
> user database, but those will not prohibit SQL Server from starting. You
> really should read KB 224071 first... :-)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
>> When trying to start SQL 2000 from dos prompt.
>> I changed the start up locations -D -L -E for my server from EM
>> server properties, Moved the Data and log files (MDF and LDFs), then
>> tried to
>> restart the server and it failed. I duplicated all files to their
>> original locations,
>> and again tried to restart from command-line with -d -l but nothing
>> works...
>> When I changed the Server Properties I used capital D, and when I try to
>> start
>> SQL from DOS I get "Invalid command option D."
>> Please help me !! what Have I done to myself
>> Does anyone have any idea what I need to do to get this server backup'
>> Thanks!!
>|||Can you post what you try to execute in the command prompt? Also, the switches to SQL Server
programs are case sensitive.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:e%23rPBuLvGHA.4460@.TK2MSFTNGP05.phx.gbl...
> Thanks, but I do have all dbs in both places, and it still wont start. I try "sqlservr" and it
> returns the "Invalid command option D."
> error
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
>> You need to put back the model database to where it used to be. The reference to the model
>> database is *inside* master.mdf. SQL Server cannot start without model since it cannot create
>> tempdb, and SQL Server cannot live without tempdb. You probably want to do the same for msdb, and
>> other user database, but those will not prohibit SQL Server from starting. You really should read
>> KB 224071 first... :-)
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "WANNABE" <breichenbach AT istate DOT com> wrote in message
>> news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
>> When trying to start SQL 2000 from dos prompt.
>> I changed the start up locations -D -L -E for my server from EM
>> server properties, Moved the Data and log files (MDF and LDFs), then tried to
>> restart the server and it failed. I duplicated all files to their original locations,
>> and again tried to restart from command-line with -d -l but nothing works...
>> When I changed the Server Properties I used capital D, and when I try to start
>> SQL from DOS I get "Invalid command option D."
>> Please help me !! what Have I done to myself
>> Does anyone have any idea what I need to do to get this server backup'
>> Thanks!!
>>
>|||I will be gone until next Tuesday.. I'll repost this if I still need help..
All I enter from the command line prompt is
sqlservr
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23dIFp4LvGHA.324@.TK2MSFTNGP06.phx.gbl...
> Can you post what you try to execute in the command prompt? Also, the
> switches to SQL Server programs are case sensitive.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:e%23rPBuLvGHA.4460@.TK2MSFTNGP05.phx.gbl...
>> Thanks, but I do have all dbs in both places, and it still wont start. I
>> try "sqlservr" and it returns the "Invalid command option D."
>> error
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
>> You need to put back the model database to where it used to be. The
>> reference to the model database is *inside* master.mdf. SQL Server
>> cannot start without model since it cannot create tempdb, and SQL Server
>> cannot live without tempdb. You probably want to do the same for msdb,
>> and other user database, but those will not prohibit SQL Server from
>> starting. You really should read KB 224071 first... :-)
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "WANNABE" <breichenbach AT istate DOT com> wrote in message
>> news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
>> When trying to start SQL 2000 from dos prompt.
>> I changed the start up locations -D -L -E for my server from EM
>> server properties, Moved the Data and log files (MDF and LDFs), then
>> tried to
>> restart the server and it failed. I duplicated all files to their
>> original locations,
>> and again tried to restart from command-line with -d -l but nothing
>> works...
>> When I changed the Server Properties I used capital D, and when I try
>> to start
>> SQL from DOS I get "Invalid command option D."
>> Please help me !! what Have I done to myself
>> Does anyone have any idea what I need to do to get this server backup'
>> Thanks!!
>>
>>
>|||If you only run sqlservr from command line, then the parameters are picked up from the registry. I
suggest you edit the registry to put in the right case, d instead of D.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:OspGsOMvGHA.4436@.TK2MSFTNGP05.phx.gbl...
>I will be gone until next Tuesday.. I'll repost this if I still need help..
> All I enter from the command line prompt is
> sqlservr
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%23dIFp4LvGHA.324@.TK2MSFTNGP06.phx.gbl...
>> Can you post what you try to execute in the command prompt? Also, the switches to SQL Server
>> programs are case sensitive.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "WANNABE" <breichenbach AT istate DOT com> wrote in message
>> news:e%23rPBuLvGHA.4460@.TK2MSFTNGP05.phx.gbl...
>> Thanks, but I do have all dbs in both places, and it still wont start. I try "sqlservr" and it
>> returns the "Invalid command option D."
>> error
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
>> news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
>> You need to put back the model database to where it used to be. The reference to the model
>> database is *inside* master.mdf. SQL Server cannot start without model since it cannot create
>> tempdb, and SQL Server cannot live without tempdb. You probably want to do the same for msdb,
>> and other user database, but those will not prohibit SQL Server from starting. You really
>> should read KB 224071 first... :-)
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "WANNABE" <breichenbach AT istate DOT com> wrote in message
>> news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
>> When trying to start SQL 2000 from dos prompt.
>> I changed the start up locations -D -L -E for my server from EM
>> server properties, Moved the Data and log files (MDF and LDFs), then tried to
>> restart the server and it failed. I duplicated all files to their original locations,
>> and again tried to restart from command-line with -d -l but nothing works...
>> When I changed the Server Properties I used capital D, and when I try to start
>> SQL from DOS I get "Invalid command option D."
>> Please help me !! what Have I done to myself
>> Does anyone have any idea what I need to do to get this server backup'
>> Thanks!!
>>
>>
>

"Invalid command option D."

When trying to start SQL 2000 from dos prompt.
I changed the start up locations -D -L -E for my server from EM
server properties, Moved the Data and log files (MDF and LDFs), then tried
to
restart the server and it failed. I duplicated all files to their original
locations,
and again tried to restart from command-line with -d -l but nothing works...
When I changed the Server Properties I used capital D, and when I try to
start
SQL from DOS I get "Invalid command option D."
Please help me !! what Have I done to myself
Does anyone have any idea what I need to do to get this server backup'
Thanks!!WANNABE wrote:
> When trying to start SQL 2000 from dos prompt.
> I changed the start up locations -D -L -E for my server from EM
> server properties, Moved the Data and log files (MDF and LDFs), then tried
> to
> restart the server and it failed. I duplicated all files to their origina
l
> locations,
> and again tried to restart from command-line with -d -l but nothing works.
.
> When I changed the Server Properties I used capital D, and when I try to
> start
> SQL from DOS I get "Invalid command option D."
> Please help me !! what Have I done to myself
> Does anyone have any idea what I need to do to get this server backup'
> Thanks!!
>
What is the EXACT command, including switches, that you are running from
the DOS prompt?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||You need to put back the model database to where it used to be. The referenc
e to the model database
is *inside* master.mdf. SQL Server cannot start without model since it canno
t create tempdb, and SQL
Server cannot live without tempdb. You probably want to do the same for msdb
, and other user
database, but those will not prohibit SQL Server from starting. You really s
hould read KB 224071
first... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
> When trying to start SQL 2000 from dos prompt.
> I changed the start up locations -D -L -E for my server from EM
> server properties, Moved the Data and log files (MDF and LDFs), then tried
to
> restart the server and it failed. I duplicated all files to their origina
l locations,
> and again tried to restart from command-line with -d -l but nothing works.
.
> When I changed the Server Properties I used capital D, and when I try to s
tart
> SQL from DOS I get "Invalid command option D."
> Please help me !! what Have I done to myself
> Does anyone have any idea what I need to do to get this server backup'
> Thanks!!
>|||Thanks, but I do have all dbs in both places, and it still wont start. I
try "sqlservr" and it returns the "Invalid command option D."
error
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
> You need to put back the model database to where it used to be. The
> reference to the model database is *inside* master.mdf. SQL Server cannot
> start without model since it cannot create tempdb, and SQL Server cannot
> live without tempdb. You probably want to do the same for msdb, and other
> user database, but those will not prohibit SQL Server from starting. You
> really should read KB 224071 first... :-)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:O%23ITWuKvGHA.4460@.TK2MSFTNGP04.phx.gbl...
>|||Can you post what you try to execute in the command prompt? Also, the switch
es to SQL Server
programs are case sensitive.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:e%23rPBuLvGHA.4460@.TK2MSFTNGP05.phx.gbl...
> Thanks, but I do have all dbs in both places, and it still wont start. I
try "sqlservr" and it
> returns the "Invalid command option D."
> error
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%23FpPvYLvGHA.428@.TK2MSFTNGP03.phx.gbl...
>|||I will be gone until next Tuesday.. I'll repost this if I still need help..
All I enter from the command line prompt is
sqlservr
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23dIFp4LvGHA.324@.TK2MSFTNGP06.phx.gbl...
> Can you post what you try to execute in the command prompt? Also, the
> switches to SQL Server programs are case sensitive.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:e%23rPBuLvGHA.4460@.TK2MSFTNGP05.phx.gbl...
>|||If you only run sqlservr from command line, then the parameters are picked u
p from the registry. I
suggest you edit the registry to put in the right case, d instead of D.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:OspGsOMvGHA.4436@.TK2MSFTNGP05.phx.gbl...
>I will be gone until next Tuesday.. I'll repost this if I still need help.
.
> All I enter from the command line prompt is
> sqlservr
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%23dIFp4LvGHA.324@.TK2MSFTNGP06.phx.gbl...
>

"Invalid Character value for cast specification" from VC++ when i execute a proc

Hi Everybody,

I have a question regarding the running of a procedure from VC++ in SQL server.

well this is the scenario.

i have a procedure in SQL server and i am running that thru my VC++ code.
:eek:
i have a recordset class and i create an object of it and then do a obj.Open(). the procedure is fetching 24 records correctly in the query analyser and in my while(!(obj.IsEOF())) loop it gets the first record correctly but the moment it encounters obj.MoveNext(); it bombs and gives me the following error..

"Invalid Character value for cast specification ".

i don't know why this is happening

Thanks for you help.Somewhere in your Transact-SQL code you are trying to convert a character value to another datatype. My first guess would be DATETIME, next might be INT or another numeric datatype. This is usually either in a column you are returning or in a WHERE clause, but it can happen anywhere you can refer to a column.

-PatP|||BTW, since this actually appears to be a Transact-SQL problem, I'm moving the thread back to the Microsoft SQL forum.

-PatP

"Invalid character in the given encoding". XML bulk load, SQLE

Hi Martin,
I confirm that the problem is the presence of the character "è", even if it
is in the comment. How can I solve the problem?
I have put the line
<?xml version="1.0" encoding="utf-8"?>
for the encoding. What else should I do?
"Martin Honnen" wrote:

> Tatopitta wrote:
>
> The error usually means that a byte sequence has been encountered that
> does not map to a character in the specified encoding in the XML
> declaration.
> --
> Martin Honnen -- MVP XML
> http://JavaScript.FAQTs.com/
>Tatopitta wrote:

> I confirm that the problem is the presence of the character "è", even if
it
> is in the comment. How can I solve the problem?
> I have put the line
> <?xml version="1.0" encoding="utf-8"?>
> for the encoding. What else should I do?
Make sure the document is really UTF-8 encoded, with UTF-8 the character
"è" needs to be encoded with the two byte sequence C3 A8.
Martin Honnen -- MVP XML
http://JavaScript.FAQTs.com/