Showing posts with label perform. Show all posts
Showing posts with label perform. Show all posts

Thursday, March 8, 2012

Cannot Update Records that contain NULL Values!

Smile

Hi,

I am trying to use a formView with an update button to update individual records in an sql database. (when i click update it doesnt perform the update and just refreshes the page. ) One of the fields in my records is a NULL - this is also one of the fields that i need to update. When i manually go into the database and enter some data, and then go back to my form, it updates fine, but as soon as i delete the data from the field, it returns to NULL and im back to square one.

Any Ideas on how to get around this problem?

THanks

Then what's wrong? Since you delete the data from the field, it should be set to NULL. What do you expect to get after deleting the data? And what's meaing of "im back to square one"|||Fix your update statement. If you've used the wizard with "Check Original Values", then you are correct, it fails with nulls. You have to manually modify the update to handle nulls.|||

yep.. i got it now... i had to change "compare all values" to "overwrite changes". That makes sense. you cant compare null values to each other.

Thanks

Sunday, February 12, 2012

Cannot restore sql user id?

Hi there,
I'm using MSSQL 2000 Standard Edition. I perform a full
database backup and restore to another server (same
version) with same database name.
Every things is OK except the sql user id I created on the
source id. Is not showing in the destination server user
id.
I try to create back the user id in the destination server
with same user name and password but still fail.
What I need to do is delete the user in the database and
recreate plus set back the permissions again!
It is any ways to backup and restore not only the table
and data but also the user id and permission even I
restore to another server?
Thanks.
ChaiWhen you restore or attach a database from another server, the mapping
between syslogins and sysusers for SQL logins gets out-of-sync. The
database userid is still there but it may be either orphaned or mapped to
the wrong login.
You can correct the mismatch with sp_change_users_login. See the Books
Online <tsqlref.chm::/ts_sp_ca-cz_8qzy.htm> for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Chai" <anonymous@.discussions.microsoft.com> wrote in message
news:89b801c404bb$2df36da0$a401280a@.phx.gbl...
> Hi there,
> I'm using MSSQL 2000 Standard Edition. I perform a full
> database backup and restore to another server (same
> version) with same database name.
> Every things is OK except the sql user id I created on the
> source id. Is not showing in the destination server user
> id.
> I try to create back the user id in the destination server
> with same user name and password but still fail.
> What I need to do is delete the user in the database and
> recreate plus set back the permissions again!
> It is any ways to backup and restore not only the table
> and data but also the user id and permission even I
> restore to another server?
> Thanks.
> Chai