Showing posts with label record. Show all posts
Showing posts with label record. Show all posts

Thursday, March 29, 2012

error when trying to delete record

Windows 2000 Server sp4, SQL Server 2000 sp3
I get the error below when attempting to delete a record from a table called
Monitor directly from Enterprise Manager GUI.
error:
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Obje
ct Name]
'tsvw_KJDKFAJDFKJAKLFDJKLAJDFKJASKFDJKAJ
DF'
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Obje
ct
Name]UserA.Monitor
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Obje
ct Name]
'ctsv_DKFJDKJFKDJFKDKFJDKJFIEJIEJIEJFIEJ
FKJDKJ'
The KDJFKDJFKJDF above is obviously not exact. The actual error contains a
long string of random characters though.. If i'm not mistaken these are
system generated names for views related to replication.
1) could this be replication related?
2) Important note: UserA is NOT the current owner of the Monitor table!
UserA used to own the table but due to replication issues the owner was
changed to dbo a long time ago. ' Can I safely run the sp_changeobjectowner
procedure specifying dbo again or would I need to drop the merge replication
in order to do that?
3) I verified that the tsvw_ect... and the ctsv_ect... do not exist in the
database?
any suggestions about how to get to the bottom of this would be GREATLY
appreciated. Thanks.It seems you have some "invalid" merge triggers (probably from a previous
publication). Did you republish after changing your table owner name? If
you do have invalid triggers, you should consider dropping and recreating
your publication.
A. Drop the subscription
B. Drop the publication.
C. Delete the triggers that reference the non-existant views
D. Recreate the publication and subscription.
E. Run the snapshot.
reference:
How to manually remove a replication in SQL Server 2000 - ID: 324401
http://support.microsoft.com/?id=324401
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx|||Thank you! I did not completely drop and recreate the merge replication
setup but what you said is exactly what happened. I had an issue removing
repl before due to the owner of the tables not being dbo. I had to manually
clean out repl.. change table owners to dbo.. and recreate the replication.
It looks like one of the triggers from the older repl setup was still there.
I found the old trigger and deleted it. It was obvious it was old because it
referenced the old user name. There were the 3 correct triggers on the table
as well. One each for insert, update, and delete. So what was happening was
this: there was the old delete trigger on this table and it was listed first
so it executed and failed. The correct trigger never fired then. Now that
old trigger is gone and all works fine.
thanks again.
"Fany Vargas [MSFT]" <fanyv@.online.microsoft.com> wrote in message
news:Yj9qhVuzEHA.3388@.cpmsftngxa10.phx.gbl...
> It seems you have some "invalid" merge triggers (probably from a previous
> publication). Did you republish after changing your table owner name? If
> you do have invalid triggers, you should consider dropping and recreating
> your publication.
> A. Drop the subscription
> B. Drop the publication.
> C. Delete the triggers that reference the non-existant views
> D. Recreate the publication and subscription.
> E. Run the snapshot.
>
> reference:
> How to manually remove a replication in SQL Server 2000 - ID: 324401
> http://support.microsoft.com/?id=324401
> Fany Vargas
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
> Microsoft software to better protect against viruses and security
> vulnerabilities. The easiest way to do this is to visit the following
> websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>

error when trying to delete record

Windows 2000 Server sp4, SQL Server 2000 sp3
I get the error below when attempting to delete a record from a table called
Monitor directly from Enterprise Manager GUI.
error:
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object Name]
'tsvw_KJDKFAJDFKJAKLFDJKLAJDFKJASKFDJKAJDF'
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object
Name]UserA.Monitor
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object Name]
'ctsv_DKFJDKJFKDJFKDKFJDKJFIEJIEJIEJFIEJFKJDKJ'
The KDJFKDJFKJDF above is obviously not exact. The actual error contains a
long string of random characters though.. If i'm not mistaken these are
system generated names for views related to replication.
1) could this be replication related?
2) Important note: UserA is NOT the current owner of the Monitor table!
UserA used to own the table but due to replication issues the owner was
changed to dbo a long time ago. ? Can I safely run the sp_changeobjectowner
procedure specifying dbo again or would I need to drop the merge replication
in order to do that?
3) I verified that the tsvw_ect... and the ctsv_ect... do not exist in the
database?
any suggestions about how to get to the bottom of this would be GREATLY
appreciated. Thanks.
It seems you have some "invalid" merge triggers (probably from a previous
publication). Did you republish after changing your table owner name? If
you do have invalid triggers, you should consider dropping and recreating
your publication.
A. Drop the subscription
B. Drop the publication.
C. Delete the triggers that reference the non-existant views
D. Recreate the publication and subscription.
E. Run the snapshot.
reference:
How to manually remove a replication in SQL Server 2000 - ID: 324401
http://support.microsoft.com/?id=324401
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||Thank you! I did not completely drop and recreate the merge replication
setup but what you said is exactly what happened. I had an issue removing
repl before due to the owner of the tables not being dbo. I had to manually
clean out repl.. change table owners to dbo.. and recreate the replication.
It looks like one of the triggers from the older repl setup was still there.
I found the old trigger and deleted it. It was obvious it was old because it
referenced the old user name. There were the 3 correct triggers on the table
as well. One each for insert, update, and delete. So what was happening was
this: there was the old delete trigger on this table and it was listed first
so it executed and failed. The correct trigger never fired then. Now that
old trigger is gone and all works fine.
thanks again.
"Fany Vargas [MSFT]" <fanyv@.online.microsoft.com> wrote in message
news:Yj9qhVuzEHA.3388@.cpmsftngxa10.phx.gbl...
> It seems you have some "invalid" merge triggers (probably from a previous
> publication). Did you republish after changing your table owner name? If
> you do have invalid triggers, you should consider dropping and recreating
> your publication.
> A. Drop the subscription
> B. Drop the publication.
> C. Delete the triggers that reference the non-existant views
> D. Recreate the publication and subscription.
> E. Run the snapshot.
>
> reference:
> How to manually remove a replication in SQL Server 2000 - ID: 324401
> http://support.microsoft.com/?id=324401
> Fany Vargas
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
> Microsoft software to better protect against viruses and security
> vulnerabilities. The easiest way to do this is to visit the following
> websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>

error when trying to delete record

Windows 2000 Server sp4, SQL Server 2000 sp3
I get the error below when attempting to delete a record from a table called
Monitor directly from Enterprise Manager GUI.
error:
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object Name]
'tsvw_KJDKFAJDFKJAKLFDJKLAJDFKJASKFDJKAJDF'
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object
Name]UserA.Monitor
[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid Object Name]
'ctsv_DKFJDKJFKDJFKDKFJDKJFIEJIEJIEJFIEJFKJDKJ'
The KDJFKDJFKJDF above is obviously not exact. The actual error contains a
long string of random characters though.. If i'm not mistaken these are
system generated names for views related to replication.
1) could this be replication related?
2) Important note: UserA is NOT the current owner of the Monitor table!
UserA used to own the table but due to replication issues the owner was
changed to dbo a long time ago. ' Can I safely run the sp_changeobjectowner
procedure specifying dbo again or would I need to drop the merge replication
in order to do that?
3) I verified that the tsvw_ect... and the ctsv_ect... do not exist in the
database?
any suggestions about how to get to the bottom of this would be GREATLY
appreciated. Thanks.It seems you have some "invalid" merge triggers (probably from a previous
publication). Did you republish after changing your table owner name? If
you do have invalid triggers, you should consider dropping and recreating
your publication.
A. Drop the subscription
B. Drop the publication.
C. Delete the triggers that reference the non-existant views
D. Recreate the publication and subscription.
E. Run the snapshot.
reference:
How to manually remove a replication in SQL Server 2000 - ID: 324401
http://support.microsoft.com/?id=324401
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx|||Thank you! I did not completely drop and recreate the merge replication
setup but what you said is exactly what happened. I had an issue removing
repl before due to the owner of the tables not being dbo. I had to manually
clean out repl.. change table owners to dbo.. and recreate the replication.
It looks like one of the triggers from the older repl setup was still there.
I found the old trigger and deleted it. It was obvious it was old because it
referenced the old user name. There were the 3 correct triggers on the table
as well. One each for insert, update, and delete. So what was happening was
this: there was the old delete trigger on this table and it was listed first
so it executed and failed. The correct trigger never fired then. Now that
old trigger is gone and all works fine.
thanks again.
"Fany Vargas [MSFT]" <fanyv@.online.microsoft.com> wrote in message
news:Yj9qhVuzEHA.3388@.cpmsftngxa10.phx.gbl...
> It seems you have some "invalid" merge triggers (probably from a previous
> publication). Did you republish after changing your table owner name? If
> you do have invalid triggers, you should consider dropping and recreating
> your publication.
> A. Drop the subscription
> B. Drop the publication.
> C. Delete the triggers that reference the non-existant views
> D. Recreate the publication and subscription.
> E. Run the snapshot.
>
> reference:
> How to manually remove a replication in SQL Server 2000 - ID: 324401
> http://support.microsoft.com/?id=324401
> Fany Vargas
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
> Microsoft software to better protect against viruses and security
> vulnerabilities. The easiest way to do this is to visit the following
> websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>

Friday, February 24, 2012

Error trapping of datasource control

Hello,

I encountered an interesting situation. I have a gridview and a sqldatasource. It has delete function. When I delete a record an error of foreign key violation is raised. I would like to trap this error and give a user friendly message to the user.

If I use ADO.Net I can use Try/Catch, but it seems there is no way to do the same thing using datasource. Anyone knows?

Thank you,

J

void CustomersGridView_RowDeleted(Object sender, GridViewDeletedEventArgs e)
{

// Display whether the delete operation succeeded.
if(e.Exception ==null)
{
Message.Text ="Row deleted successfully.";
}
else
{
Message.Text ="An error occurredwhile attempting to delete the row.";
e.ExceptionHandled =true;
}

}

Take a look@.MSDNhttp://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdeleted.aspx
|||

Hosam,

Thank you for the reply. It helps, but I would like to get more specific message and give users a friendly message based on that. That is, how can I know the exception is raised due to foreign key violation specifically for example?

Or is there any way to trap the error message passed by a stored procedure?

Thank you,

J

|||

What about check forConstraintException

http://msdn2.microsoft.com/en-us/library/system.data(VS.71).aspx

http://msdn2.microsoft.com/en-us/library/system.data.constraintexception(VS.71).aspx

|||

That is a good suggestion. I will read them.

By the way, thinking for a little time your previous answer does not make sense. The exception is handled after row is ALREADY deleted?

|||

But note that if this exception was thrown nor record will be deleted as the constraint will prevent this.

So if the exception exists no records actually deleted.

|||

Thank you, Hosam.

I tested with detailsview's inserted event, but it did not work. However, what you were saying makes sense as well. I will look into details. If I find more new things, I wll post it here. Thank you.

J

Sunday, February 19, 2012

Error tmp file is too large

I am getting the follwoing error when running my package.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for Visual FoxPro" Hresult: 0x80004005 Description: "File c:\docume~1\sortiz\locals~1\temp\00003589001o.tmp is too large.".

I use a select statement to join to large foxpro tables. The data contains over a million records.

Any help is greatly appreciated.

Thanks

Try loading the fox pro data into a SQL Server table first, and then do your join there.