Format:
Recent snippets matching tags of database
CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) SET NOCOUNT ON
62 Views
no comments
select name as 'Database Name', [dbid] from master.dbo.sysdatabases
66 Views
no comments
/* Since you cant alter the database straight away, you first need to kill the user thats currently connected to it... So... Step 1: Get the session thats connected to that database */ select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame from master.dbo.sysprocesses p inner join master.dbo.sysdatabases d on p.dbid = d.dbid where d.name = 'DATABASE NAME GOES HERE'
64 Views
no comments
// =============================================================================== // Microsoft Data Access Application Block for .NET // http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp // // SQLHelper.cs // // This file contains the implementations of the SqlHelper and SqlHelperParameterCache // classes. // // For more information see the Data Access Application Block Implementation Overview.
204 Views
no comments
using System.Data; using System.Data.OracleClient; using Microsoft.Practices.EnterpriseLibrary.Data; string sql = "DELETE from FFATA_RULES where N_ID = :N_ID"; Database db = DatabaseFactory.CreateDatabase(); System.Data.Common.DbCommand cmd = db.GetSqlStringCommand(sql); db.AddInParameter(cmd, ":N_ID", DbType.Int32, ID); db.ExecuteNonQuery(cmd);
153 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
