Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Wednesday, March 21, 2012

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

sql

Monday, March 19, 2012

MS SQL Question regarding page/index defrag.

I know the shortcut to 'defragging' the database to eliminate andreclaim 'whitespace' in data and index pages is to setup a maintenanceplan. This doesn't work for me for two reasons:1. I like to know how things work.2. I can not create maintenance plans with my hosted provider.I use the following T-SQL to rebuild all indexes on all tables:-- exec sp_MSforeachtable "DBCC DBREINDEX ('?', ' ', 90)But, does that not only address indexes? What about getting whitepaceback from data in tables themselves?Am I over-thinking this?When you're paying for SQL by the MB and generate a lot of data (with afair amount of churn) you want to keep it optimized and efficient,right?You could run DBCC ShrinkDB, DBCC ShrinkFile and Truncat your transaction Log, I think all of the above will not return all of the space for you because there is some space SQL Server marks as Active. BTW Maintaince plans are Server based while Jobs can run your DBCCs for your database only. Hope this helps.