Showing posts with label rows. Show all posts
Showing posts with label rows. Show all posts

Thursday, March 22, 2012

cannot open table in Enterprise manager

Hi, each time I want to open a table (return all rows)
this message pop up:
The query cannot be executed because some files are
either missing or not registered.
I found, on microsoft.com, that I just have to reinstall
the product or use regsvr32.exe to register some dll's.
I tried both solutions and it's not working.
Any ideas?
thanks
A little more information might help - What application are you using to
perform the query?
Jim
"eric champagne" <anonymous@.discussions.microsoft.com> wrote in message
news:1417e01c41801$7a6a3070$a601280a@.phx.gbl...
> Hi, each time I want to open a table (return all rows)
> this message pop up:
> The query cannot be executed because some files are
> either missing or not registered.
> I found, on microsoft.com, that I just have to reinstall
> the product or use regsvr32.exe to register some dll's.
> I tried both solutions and it's not working.
> Any ideas?
> thanks
|||sql server enterprise manager 2000... on my other windows
xp workstation , it's working fine.

>--Original Message--
>A little more information might help - What application
are you using to
>perform the query?
>Jim
>"eric champagne" <anonymous@.discussions.microsoft.com>
wrote in message
>news:1417e01c41801$7a6a3070$a601280a@.phx.gbl...
reinstall
>
>.
>
|||Did you apply Service Pack 3a of SQL Server to the workstation? This needs
to be done to update EM also.
Jim
<anonymous@.discussions.microsoft.com> wrote in message
news:142be01c41813$7d1bddc0$a601280a@.phx.gbl...
> sql server enterprise manager 2000... on my other windows
> xp workstation , it's working fine.
> are you using to
> wrote in message
> reinstall
|||Yes I did that...
It's very strange because it's working on all my other
workstation with XP

>--Original Message--
>Did you apply Service Pack 3a of SQL Server to the
workstation? This needs
>to be done to update EM also.
>Jim
><anonymous@.discussions.microsoft.com> wrote in message
>news:142be01c41813$7d1bddc0$a601280a@.phx.gbl...
windows
application
rows)
dll's.
>
>.
>
|||Did you reinstall the client tools?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"eric champagne" <anonymous@.discussions.microsoft.com> wrote in message
news:1417e01c41801$7a6a3070$a601280a@.phx.gbl...
> Hi, each time I want to open a table (return all rows)
> this message pop up:
> The query cannot be executed because some files are
> either missing or not registered.
> I found, on microsoft.com, that I just have to reinstall
> the product or use regsvr32.exe to register some dll's.
> I tried both solutions and it's not working.
> Any ideas?
> thanks
|||Are you trying to use Query Analyzer or the table data browser in EM?
Can you run queries using QA?
Jim
<anonymous@.discussions.microsoft.com> wrote in message
news:143b801c41821$c469c530$a601280a@.phx.gbl...
> Yes I did that...
> It's very strange because it's working on all my other
> workstation with XP
> workstation? This needs
> windows
> application
> rows)
> dll's.

Tuesday, March 20, 2012

Cannot open database requested in login...

Hi,

I am using ASP to connect to an MS SQL database. The script connects to the database OK and I can retrieve recordset data and add new rows without a problem.

However, when I try to edit a recordset (using the recordset.update command), I get the following error:

Cannot open database requested in login 'andthen_development'. Login fails.

My first thought was that it must be a permissions problem, but that doesn't explain why I can view and add rows, but not edit. Any ideas?

Thanks, Pauldid you try an "Update" command

objCommand.ActiveConnection = objConnection objCommand.CommandText = "Update Table tbl set ..."
Call objCommand.Execute

just see if this works with your login

or try updating with the QA and your login|||then we'll see why the RecordSet.Update doesn't work|||Just tried an "UPDATE TABLE..." command directly and it works fine. However, I have an ASP include file that I use to handle all database functionality centrally. Included in this is the following function:

Function editRow(sqlString, rowParameters)
'#-- UPDATES AN EXISTING DATABASE ROW

'#-- SET UP RECORDSET FOR EDITING A RECORD
Set recordSet = Server.CreateObject("ADODB.RecordSet")
recordSet.CursorLocation = adUseServer
recordSet.CursorType = adOpenForwardOnly
recordSet.LockType = adLockOptimistic

recordSet.Open sqlString, connection, , ,adCmdText

'#-- ITERATE THROUGH rowParameters TO UPDATE ITEM'S FIELDS
Dim rowField
For Each rowField In rowParameters
recordSet(rowField) = rowParameters.Item(rowField)
Next

'#--UPDATE RECORDSET (UPDATE RECORD)
recordSet.Update

End Function

The function accepts an SQL string to identify the row (e.g. "SELECT * FROM...") and a Dictionary object that contains keys relating to field names and values giving the new contents for the row.

This produces an error on the recordset.Update line.

Paul|||maybe it's the cursor location
or one of the option of the recordset

Set recordSet = Server.CreateObject("ADODB.RecordSet")
recordSet.CursorLocation = adUseServer
recordSet.CursorType = adOpenForwardOnly
recordSet.LockType = adLockOptimistic

Sunday, March 11, 2012

Cannot modify data

Hi,
Sometimes when I try to modify data in enterprise manager, I get this error:
Key column information is insufficient or incorrect.
Too many rows were affected by
How can I solve this problem?
Many thanks in advance.
Leila
Hi
There are a few issue with modifying data in EM, this seems to be that the
row you are changing can not be distinguished i.e it does not have a Primary
Key. Query analyser is usually a better tool to do larger or more complex
updates.
John
"Leila" <lelas@.hotpop.com> wrote in message
news:uhjs7s6oEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Sometimes when I try to modify data in enterprise manager, I get this
error:
> Key column information is insufficient or incorrect.
> Too many rows were affected by
> How can I solve this problem?
> Many thanks in advance.
> Leila
>
|||I can image that if your PK has multiple columns, you might get this. So as
the previous poster suggests, change it using an update statement.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Leila" <lelas@.hotpop.com> wrote in message
news:uhjs7s6oEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Sometimes when I try to modify data in enterprise manager, I get this
error:
> Key column information is insufficient or incorrect.
> Too many rows were affected by
> How can I solve this problem?
> Many thanks in advance.
> Leila
>

Cannot modify data

Hi,
Sometimes when I try to modify data in enterprise manager, I get this error:
Key column information is insufficient or incorrect.
Too many rows were affected by
How can I solve this problem?
Many thanks in advance.
LeilaHi
There are a few issue with modifying data in EM, this seems to be that the
row you are changing can not be distinguished i.e it does not have a Primary
Key. Query analyser is usually a better tool to do larger or more complex
updates.
John
"Leila" <lelas@.hotpop.com> wrote in message
news:uhjs7s6oEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Sometimes when I try to modify data in enterprise manager, I get this
error:
> Key column information is insufficient or incorrect.
> Too many rows were affected by
> How can I solve this problem?
> Many thanks in advance.
> Leila
>|||I can image that if your PK has multiple columns, you might get this. So as
the previous poster suggests, change it using an update statement.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Leila" <lelas@.hotpop.com> wrote in message
news:uhjs7s6oEHA.1816@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Sometimes when I try to modify data in enterprise manager, I get this
error:
> Key column information is insufficient or incorrect.
> Too many rows were affected by
> How can I solve this problem?
> Many thanks in advance.
> Leila
>

Friday, February 24, 2012

Cannot insert row into table

Hello

Although I am able to delete a row from CatA table, I am unable to insert a row into the same table.

The rows are from 1 to 241, I accidentally deleted row 41, together with row 42 which I wanted to delete. But I can't reinsert row 41.

I see this message:

INSERT INTO [dbo].[CatA]([CatA_ID], [LName], [Auto], [Advertising], [Antiques], [Art], [Astrology])
VALUES(41, N'JSmith', '(null)', '(null)', '(null)', '(null)', '(null)')

Error: Query(1/2) Cannot insert explicit value for identity column in table 'CatA' when IDENTITY_INSERT is set to OFF.

Below are the settings for this table, I have tried to change the settings but I am prevented.

CatA_ID = Primary Key

Parameter and Value:

Identity = yes

Identity Seed = 1

Identity Increment = 1

IsRowGuidCol = No

What do I need to do, how do I reinsert the row 41 or insert a new row in the future?

Please advise.

Regards

Lynn

with an auto-incrementing field, you never use that field in your insert statement - it, by it's name, auto-increments whenever a row is added to the database table. You can't insert to a specific row, using the auto-increment table.

If you deleted item 41 and item 42 - the next item inserted will be item 43. You really don't need to worry that the auto-incrementing fields are not fully sequential - if they are missing some numbers, it doesn't matter at all.

remember, when inserting into the table, do not use the identity/auto-incrementing field in your insert statement.

|||

Hello augustwind

Thanks for the reply. When I was creating the tables, I just ticked the boxes. Is there a way I can undo this?

I don't mind if the numbers are not sequential, but I just can't insert a row.

If I try to insert using the next number in sequence or number 42 I get the error mentioned in my first post.

My database is SQL 2000 and I am editing with Aqua Data Studio.

I have the option to insert data directly into the table, but when I tried without inserting a number I saw this error.

INSERT INTO [dbo].[CatA]()
VALUES()

Error: Query(1/1) Line 2: Incorrect syntax near ')'.


How do I insert a row? If I need to use syntax, what is the correct syntax required?

Or how do I remove the auto insert in my table?

Thanks.

Regards

Lynn

|||

Hi

If you accidentally delete a record with an identity column you could follow those to restore it:

Set the Identity Specification(is Identity) of the identity column toNo -->insert the record you deleted -->Set the Identity Specification(is Identity) of the identity column toyes

Hope this helps.

|||

Hello

Thanks for your reply and help.

I now know that I am unable to insert data directly into the row.

Below is the syntex which I have found to work and which might assist other sql beginners.

SET IDENTITY_INSERT CatA OFF

INSERT INTO CatA ( [LName])
VALUES( N'SJones')

GO

Thanks

Lynn

|||Hi Lynn, the error message you mentioned in the first post should give you some promptSmile, you can temporarily turn onIDENTITY_INSERT when you want to insert a row with specifying identity number:

SET IDENTITY_INSERT?CatA ON

INSERT INTO [dbo].[CatA]([CatA_ID], [LName], [Auto], [Advertising], [Antiques], [Art], [Astrology])
VALUES(41, N'JSmith', '(null)', '(null)', '(null)', '(null)', '(null)')

SET IDENTITY_INSERT?CatA OFF