AspState Aktif Etmek için

by Behlul 5. January 2010 17:35

Sessionlarımızı kalıcı olarak sql de tutmak için

MSSQL'imizi kurduktan sonra

 

Comand prompt'tan

mevcut framework klasörüne erişip aşağıdaki kodu çalıştırdığımızda ilgili tabloların yartılıdığını görürürüz

 

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -ssadd -sstype p -U sa -P sasifresi -S .

Burdaki -P yi yazmazssak ilgili tabloların yaratılmadıgını göreceğiz bu aspstatelerin sql memory'sinde tutulmasını sağlar

ilgili sql yada server kapatıldıgında aspstateler gitmiş olur...

daha fazla bilgi için;

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -?

yazarak açıklamaları okumanızı tavsiye ederim

 

şimdi web config dosyamıza

<

 

sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=ilgiliserver; user id=kullaniciID;password=sifre"

/>


yazmamız yeterli olacaktır.

Tags: ,

Coding | Hint

Over by Partition

by Behlul 29. December 2009 05:45

SELECT *
FROM(

      SELECT  *,
                 ROW_NUMBER() OVER (PARTITION BY TestMasterID ORDER BY TestMasterID desc ) as pos                
       FROM
  TestDetay
      
)as Detay INNER JOIN TestMaster as Master on Master.TestMasterID=Detay.TestMasterID
Where Detay.pos >2

Tags:

Coding | Hint

Redirect after 3 seconds

by Behlul 25. December 2009 07:43

<head>
   <META HTTP-EQUIV="refresh" content="3;URL=banu.htm">
</head>

Tags:

Coding | Hint

window.location.href simple link works in IE but not in Firefox

by Behlul 8. December 2009 19:25

Aynı Sayfa içinde window.location.href ' le verince Firefox ve chrome da sayfa postback oluyor.

bunun yerine window.location.hash kullanılırsa sorun çözülüyor....

< a  onclick="selectTab(2);" style="cursor: pointer;"><script type="text/javascript"

$(document).ready(function(){

$(

"#tabs").tabs();

 

 });

 

function selectTab(tab) {

var $tabs = $('#tabs').tabs();

$tabs.tabs('select', tab);

var locationObj = "#tabs"; return false;

window.location.hash = locationObj;

 

 }

</script>

 

Tags: , ,

Coding | Hint

IE'nin window.attachEvent i varsa Firefox'un ....

by Behlul 6. October 2009 16:10

 if  (window.addEventListener)

         window.addEventListener('load', function, false)

else if (window.attachEvent)

 window.attachEvent('onload', function);

else if (document.getElementById)

        window.onload=function;

Tags:

Coding | Hint

Chrome Incognito

by Behlul 23. September 2009 15:04

Tags: ,

Hint

Improve Stored Procedure Performance

by Behlul 9. September 2009 16:34

Sometimes even the simplest things can make a difference.  One of these simple items that should be part of every stored procedure is SET NOCOUNT ON.  This one line of code, put at the top of a stored procedure turns off the messages that SQL Server sends back to the client after each T-SQL statement is executed.  This is performed for all SELECT, INSERT, UPDATE, and DELETE statements. Having this information is handy when you run a T-SQL statement in a query window, but when stored procedures are run there is no need for this information to be passed back to the client.

By removing this extra overhead from the network it can greatly improve overall performance for your database and application.

If you still need to get the number of rows affected by the T-SQL statement that is executing you can still use the @@ROWCOUNT option.  By issuing a SET NOCOUNT ON this function (@@ROWCOUNT) still works and can still be used in your stored procedures to identify how many rows were affected by the statement.

Tags: , ,

Coding | Hint

Sql ShortCuts

by Behlul 4. September 2009 18:44

Management studio'da kısa yolları kaydetmek için Tools ==> Options ==> Keybord seçerek

istenilen tuş kombinasyonuna ister yazdığımız bir function, ister bir store procedure atayabiliyoruz.

atamadan sonra Management Studio'yu tekrar başlatmak gerekiyor...

Tags: , ,

Coding | Hint

Son güncellenenler

by Behlul 24. October 2008 10:26

SELECT
    *
FROM
    INFORMATION_SCHEMA.ROUTINES
ORDER BY
    
LAST_ALTERED DESC

Tags: ,

Hint

Disable Button After Click

by Behlul 12. February 2008 07:24

 

Aklımızda, blogumuzda dursun

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

   If Not Page.IsPostBack Then

      btnEKTalepEkle.Attributes.Add(

"onclick", "btnEKTalepEkle.disabled=true;" & Me.GetPostBackEventReference(Me.btnEKTalepEkle))

  End If

Tags:

Coding | Hint

What is Project Management

by Behlul 14. January 2008 07:46

Budur....

Tags:

Coding | Hint

QR Message

Qr Message

Behlül Behram Kimdir?

2004 yılında Doğu Akdeniz Üniversitesi Bilgisayar Mühendisliği Bölümünden mezun oldu. 2000 yılından günümüze kadar C, C++, VB, VB.NET, C# dilleri ile bir çok proje yaptı. Halen bir medya kuruluşunda  "Yazılım Uzmanı" olarak çalışmaktadır...