Wednesday, March 7, 2012
how to retrieve one record
Thanks.No can do, unless the application was set up to archive changes.
Your only option is to restore the database to a new database from a backup and then transfer that record back into your production database.|||Thanks. I think so. If i want to restore the database to new database, i have to create a new database first, then restore, is that right? I tried, it failed.|||No, but it is the method I usually use.
You can restore the database backup to a new database all in one step, if you wish.
Make sure on the second page of the Restore Database Dialog box that you have correct file paths for the new database and log files. That is probably what generated your error.
Friday, February 24, 2012
how to retreive data depends on another data ...
my application will add and delete and update records in db
my problem is when to update and delete ..
I have two dropdownboxes one to retreive servers and one to retreive dbs in the server ...
SqlDataAdapter daa =
new SqlDataAdapter("SELECT * FROM DB_tbl"+","+"Servers_tbl where Servers_tbl.Server_Name == '"+ DropDownList4.SelectedValue +"' ", sqlConnection1 );
this is the structure of each table >>
servers_tbl : SRV_ID,Server_name
DB_teb : DB_ID,SRV_ID,DB_name
the dropdown box retreive just the names ... so what is the base of where part of the command
hint : the DB_tbl does not have the server name but has the sever id
Hi Adorer,
Based on my understanding, you need to know when to issue a data bind on the dropdownlist which displays db names.
I think you can handle the SelectedIndexChanged event of the Server DropDownList to fill the db names.
You can use 2 SqlDataSources and use a ControlParameter to achieve this. Also, make sure you have set AutoPostback property to true.
HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!
Sunday, February 19, 2012
how to restrict developers from create / delete tables
I want developers to be able to do anything but CREATE/DELETE tables.
Thank you.Well by default no one has any abilities in SQL Server. So if they can
already create and delete tables you must have put them in a role that has
these permissions. Chances are you made them dbo? If so you need to remove
them from the dbo role and assign them to a role that has what permissions
you want.
Andrew J. Kelly SQL MVP
"UnkleVo" <isharko@.att.net> wrote in message
news:a3538463.0407140656.53522073@.posting.google.com...
> Can anybody tell me a simple way of removing CREATE/DELETE table rights.
> I want developers to be able to do anything but CREATE/DELETE tables.
>
> Thank you.