This step-by-step article describes how to move a database diagram that was created in SQL Server Enterprise Manager. Database diagrams are contained in the dtproperties system table of the database.
How to Move a Database Diagram in SQL Server 7.0 and 2000
1.
Expand the Databases folder.
2.
Right-click the database that contains the diagram that you want to copy, click All Tasks, and then click Export Data
3.
In the Data Transformation Services Import/Export Wizard, click Next.
4.
On the Choose a Data Source page, click Next.
5.
On the Choose a Destination page, select the server and database to which you want to transfer the database diagram. Click Next.
6.
On the Specify Table Copy or Query page, click to select the Use a Query to specify the database to transfer check box, and then click Next.
7.
On the Type SQL Statement page, type the following line, and then click Next:select * from dtproperties
Sunday, March 20, 2005
How to set focus on control in asp.net
How to set focus on control in asp.net
private void SetFocus(Control ctrl) // Define the JavaScript function for the specified control. string focusScript = "script language="'javascript'"" + "document.getElementById('" + ctrl.ClientID + "').focus();script
"; // Add the JavaScript code to the page. Page.RegisterStartupScript("FocusScript", focusScript);
private void SetFocus(Control ctrl) // Define the JavaScript function for the specified control. string focusScript = "script language="'javascript'"" + "document.getElementById('" + ctrl.ClientID + "').focus();script
"; // Add the JavaScript code to the page. Page.RegisterStartupScript("FocusScript", focusScript);
Saturday, March 19, 2005
C#: Progress bar for file upload
A good article which explains how to give progress bar for file upload
http://www.codeproject.com/aspnet/FileUploadProgressBar.asp
http://www.codeproject.com/aspnet/FileUploadProgressBar.asp
SQL Server : Which specific SQL Server user is logged into which database ?
SQL Server's master database stores tables with important and constantly updated information about the state of the SQL server. One of these tables, sysprocesses, can be used to track (in SQL Server itself) which SQL Server users are currently logged in and which database(s) they are accessing.
The quick way to find out if a particular user is accessing a particular table is with a query. The example below checks to see if SQL user syegul is accessing the database BigTable:
select * from master.dbo.sysprocesseswhere loginame = 'syegul'and dbid = db_id('Northwind'))
(Note that the column loginame is spelled just like that, with one n, not two.)
The columns returned from this query allow you to look for numerous criteria for each user connection, such as which protocol the person is using (handy if you want to determine if a user is connecting locally through named pipes or by TCP/IP), what process ID they're attached to and so on. Note that this method will not work if you are abstracting multiple anonymous connections -- for instance, if you are using a Web server front end as the main way to access your data, since everyone will be connecting as the same user.
If you're thinking about writing a trigger for this table that fires whenever a certain user makes a connection or whenever someone accesses a certain table, it won't work -- no, not even if you enable modifications to the system catalogs. It's probably for the best, since one very wise SQL Server administrators' school of thought holds that making such modifications to the master database is a bad idea no matter what the pretext. The best approach to do something like this might be to create a trigger on a given table that fires when a specific type of change is made and then checks the sysprocesses table to see if the user in question is the one making the modification.
The quick way to find out if a particular user is accessing a particular table is with a query. The example below checks to see if SQL user syegul is accessing the database BigTable:
select * from master.dbo.sysprocesseswhere loginame = 'syegul'and dbid = db_id('Northwind'))
(Note that the column loginame is spelled just like that, with one n, not two.)
The columns returned from this query allow you to look for numerous criteria for each user connection, such as which protocol the person is using (handy if you want to determine if a user is connecting locally through named pipes or by TCP/IP), what process ID they're attached to and so on. Note that this method will not work if you are abstracting multiple anonymous connections -- for instance, if you are using a Web server front end as the main way to access your data, since everyone will be connecting as the same user.
If you're thinking about writing a trigger for this table that fires whenever a certain user makes a connection or whenever someone accesses a certain table, it won't work -- no, not even if you enable modifications to the system catalogs. It's probably for the best, since one very wise SQL Server administrators' school of thought holds that making such modifications to the master database is a bad idea no matter what the pretext. The best approach to do something like this might be to create a trigger on a given table that fires when a specific type of change is made and then checks the sysprocesses table to see if the user in question is the one making the modification.
Thursday, March 03, 2005
Rich text editors
http://www.fckeditor.net/Demo/Demo04.html?silver
A very good freeware rich text editor
A very famous open source WIKI
http://www.openwiki.info/ow.asp?Samples#h1
http://www.high-beyond.com/perspective.aspx?action=view&page=perspective:Perspective081
A very good freeware rich text editor
A very famous open source WIKI
http://www.openwiki.info/ow.asp?Samples#h1
http://www.high-beyond.com/perspective.aspx?action=view&page=perspective:Perspective081
Monday, February 28, 2005
Monday, February 21, 2005
Dot net questions and answers
A good collection of dot net questions and answers
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
http://groups.msn.com/MumbaiUserGroup/netinterviewquestions.msnw
Subscribe to:
Posts (Atom)
