Kayıtlar

Getting the current time with JavaScript

URL:   http://www.webdevelopersnotes.com/tips/html/getting_cur... Javascript ile takvimsel değerleri kendinize göre kişiselleştirebilmek için güzel bir başlangıç noktası. See this Amp at http://amplify.com/u/gfam

Quick and Easy jQuery Read More Script Tutorial

URL:   http://www.queness.com/post/5368/quick-and-easy-jquery-... Sayfa tasarımınızı içindeki içerikleri Carousel script ile yapmak için güzel bir eğitsel içerik. See this Amp at http://amplify.com/u/g647

T-sql üzerinde gelen değişkeni bölmek için fonksiyon

Bu t-sql kodu ile user defined function oluşturarak gelen string değerleri istediğimiz gibi bölebiliriz. CREATE FUNCTION dbo.Split(@STRING nvarchar(4000), @Delimiter char(1)) RETURNS @Results TABLE (Items nvarchar(4000)) AS BEGIN DECLARE @INDEX INT DECLARE @SLICE nvarchar(4000) SELECT @INDEX = 1 IF @STRING IS NULL RETURN WHILE @INDEX !=0 BEGIN SELECT @INDEX = CHARINDEX(@Delimiter,@STRING) IF @INDEX !=0 SELECT @SLICE = RTRIM(LTRIM(LEFT(@STRING,@INDEX - 1))) ELSE SELECT @SLICE = RTRIM(LTRIM(@STRING)) INSERT INTO @Results(Items) VALUES(@SLICE) SELECT @STRING = RIGHT(@STRING,LEN(@STRING) - @INDEX) IF LEN(@STRING) = 0 BREAK END RETURN END daha sonra store procedure de kodu çağırmak için aşağıdaki gibi yazabiliriz. Select * From dbo.Split( @deger, ´,´)

List Box Item içindeki elemanları aşağı veya yukarı taşımak

Bu fonksiyonu kullanabilirsiniz. Aşağı ve yukarı butonları şekildeki gibi çağırabilirsiniz. Buttondown ilgili ögeyi aşağıya indirecektir. ButtonUp ilgili ögeyi yukarı taşıyacaktır. protected void ButtonDown_Click(object sender, EventArgs e) { MoveListboxItem(1, ListBox2); } protected void ButtonUp_Click(object sender, EventArgs e) { MoveListboxItem(-1, ListBox2); } private void MoveListboxItem(int index, ListBox listBox) { if (listBox.SelectedIndex != -1) //is there an item selected? { //if it's moving up, the loop moves from first to last, otherwise, it moves from last to first for (int i = (index < 0 ? 0 : listBox.Items.Count - 1); index < 0 ? i < listBox.Items.Count : i > -1; i -= index) { if (listBox.Items[i].Selected) { //if it's moving up, it should not be the first item, or, if it's moving down, it should no...

Table Variables

Sql'de saklı yordamlar ile çalışırken saklı yordam içinde dinamik t-sql bir değer döndürüyorsanız ve bu sp'yi entity framework 4.0 ile kullanıyorsanız "The selected stored procedure returns no columns" hatası alabilirsiniz. Bunu çözmek için Table variables kullanabilirsiniz. Örnek -- tablevariable declare edilir ve içinde dönecek kolonlar tipleri ile belirtilir. Declare @MyTableVar table (Hab int, Ord int, TiBas nvarchar(max) ) -- table variable ilgili sp sonucu atanır Insert @MyTableVar Exec Cms_Anasayfa_SelectedNews_Select -- atanan değer çağırılır. Select * from @MyTableVar Amplify’d from searchsqlserver.techtarget.com Table variables Table Variables objects objects Table variables are objects similar to temporary tables and were introduced in SQL Server 2000. A table variable is declared using the table data type. A statement declaring a table variable initializes the variable as an empty table with a specified structure. As a table defini...

Entity Framework 4 ile çalışırken karşılaştığım hata "The selected stored procedure returns no columns"

"The selected stored procedure returns no columns" bu hatayı çözmek için aşağıdaki sayfada birden fazla çözüm yeralmakta ben sorunu sp'nin değerlerini table variable döndürerek hallettim. Amplify’d from mysoftwarenotes.wordpress.com Entity Framework 4 – The selected stored procedure returns no columns You create a stored procedure, you bring it into your entity model, you start to create a function import, you click the “Get Column Information” button and you get “The selected stored procedure returns no columns.” The reasons I’ve seen for this are: The solutions I’ve found are: For #1 You are returning your result set using dynamic sql, so EF can’t figure out at design time what the shape of the results will be. You are selecting from a temp table and EF can’t figure out the shape of the results at design time. Your stored procedure crosses databases and although you have all the rights you need in the database containing...

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Amplify’d from www.hayrullahguven.com The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Bu hatanın çözümü tarih formatından kaynaklanıyor. MsSqlServer de standart olarak ingilizde dil ayaarı olarak gelir ve o dilin kültürü kullanılır. Tarih formatıda dolayısıyla ay.gün.yıl olarak çalışır. Buna karşın biz ise gün.ay.yıl formatını kullanırız işte. Çözüm ise gayet basittir. Convert. :) Bir insert cümlesi için örnek verecek olursak Insert Into tablo_adı ( tarih_alanı ) Values ( Convert(DateTime, '25.12.2009', 104)) gibi bir örnek olur. Aynı convert metodunu select update sqlleri içinde kullanabilirisniz. Read more at www.hayrullahguven.com   See this Amp at http://amplify.com/u/djmt