Click here to Skip to main content
15,900,511 members
Home / Discussions / Database
   

Database

 
GeneralRe: View Pin
Marek Grzenkowicz5-Feb-08 22:09
Marek Grzenkowicz5-Feb-08 22:09 
GeneralRe: View Pin
Rob Philpott5-Feb-08 0:53
Rob Philpott5-Feb-08 0:53 
GeneralASP .Net 2.0 and connect to Sql Server 2000 Pin
reza toorani4-Feb-08 20:47
reza toorani4-Feb-08 20:47 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
love_man0014-Feb-08 21:57
love_man0014-Feb-08 21:57 
QuestionRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
pmarfleet4-Feb-08 23:50
pmarfleet4-Feb-08 23:50 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
love_man0015-Feb-08 0:02
love_man0015-Feb-08 0:02 
QuestionRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
pmarfleet5-Feb-08 0:13
pmarfleet5-Feb-08 0:13 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
love_man0015-Feb-08 0:21
love_man0015-Feb-08 0:21 
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for VeriTabani
/// </summary>
public class VeriTabani
{
public VeriTabani()
{
//
// TODO: Add constructor logic here
//
}

public static SqlConnection sqlBaglanti = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["Baglanti"]);

public static DataView DV_Sehirler() //ZOR OLAN
{
sqlBaglanti.Open();
SqlCommand sqlKomut = new SqlCommand("Select * from tbl_sehir", sqlBaglanti);
SqlDataReader sqlSatirOkuyucu = sqlKomut.ExecuteReader();

DataSet ds = new DataSet();

DataTable dt = new DataTable();
dt.Columns.Add("sehir_id",typeof(Int32));
dt.Columns.Add("sehir", typeof(string));

DataRow dr;

while (sqlSatirOkuyucu.Read())
{
dr = dt.NewRow();
dr["sehir_id"] = sqlSatirOkuyucu["sehir_id"].ToString();
dr["sehir"] = sqlSatirOkuyucu["sehir"].ToString();
dt.Rows.Add(dr);
}

ds.Tables.Add(dt);

sqlBaglanti.Close();
return ds.Tables[0].DefaultView;

}

public static DataView DV_SehirSonuc()
{

SqlDataAdapter sqlAdapter = new SqlDataAdapter("Select * from tbl_sehir", sqlBaglanti);
DataSet ds = new DataSet();

sqlAdapter.Fill(ds);
sqlBaglanti.Close();

return ds.Tables[0].DefaultView;

}

public static DataView DV_Sonuc(string sql)
{

SqlDataAdapter sqlAdapter = new SqlDataAdapter(sql, sqlBaglanti);
DataSet ds = new DataSet();

sqlAdapter.Fill(ds);
sqlBaglanti.Close();

return ds.Tables[0].DefaultView;

}

public static void Sorgu_Calistir(string sql)
{


SqlCommand sqlCommand = new SqlCommand(sql, sqlBaglanti);
if (sqlCommand.Connection.State == ConnectionState.Closed)
{
sqlBaglanti.Open();
}

sqlCommand.ExecuteNonQuery();
sqlBaglanti.Close();
}
}

Boya - Badana - Tadilat ve Tamirat Isleri Bir Yudum Kahve Molasi (Coffee) Dügün Nisan ve Gelinlik (wedding)
Google Reklamlarinizi Sadece Siz Yönetin Elektrik Proje Tesisat Projesi Çizimi Illere Göre Nakliyat Firmalari Istatistik
http://www.evdenevenakliyatbul.com

GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
pmarfleet5-Feb-08 0:29
pmarfleet5-Feb-08 0:29 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
love_man0015-Feb-08 0:30
love_man0015-Feb-08 0:30 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
pmarfleet5-Feb-08 0:33
pmarfleet5-Feb-08 0:33 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
imsathy5-Feb-08 0:40
imsathy5-Feb-08 0:40 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
love_man0015-Feb-08 0:42
love_man0015-Feb-08 0:42 
GeneralRe: ASP .Net 2.0 and connect to Sql Server 2000 Pin
pmarfleet5-Feb-08 1:55
pmarfleet5-Feb-08 1:55 
GeneralPick Records from Database Pin
Rupesh Kumar Swami4-Feb-08 19:55
Rupesh Kumar Swami4-Feb-08 19:55 
GeneralRe: Pick Records from Database Pin
pmarfleet4-Feb-08 21:37
pmarfleet4-Feb-08 21:37 
GeneralRe: Pick Records from Database Pin
Rupesh Kumar Swami4-Feb-08 22:47
Rupesh Kumar Swami4-Feb-08 22:47 
GeneralRe: Pick Records from Database Pin
pmarfleet4-Feb-08 23:18
pmarfleet4-Feb-08 23:18 
GeneralInserting CSV File to SQL SERVER TABLE Pin
ps_prakash024-Feb-08 5:41
ps_prakash024-Feb-08 5:41 
GeneralRe: Inserting CSV File to SQL SERVER TABLE Pin
Chris Meech4-Feb-08 7:34
Chris Meech4-Feb-08 7:34 
GeneralRe: Inserting CSV File to SQL SERVER TABLE Pin
ps_prakash0211-Feb-08 1:05
ps_prakash0211-Feb-08 1:05 
GeneralRe: Inserting CSV File to SQL SERVER TABLE Pin
Sabarinathan T5-Feb-08 4:56
Sabarinathan T5-Feb-08 4:56 
GeneralTrigger on Replicated Database Table Pin
Talsaniya Jayesh4-Feb-08 5:04
professionalTalsaniya Jayesh4-Feb-08 5:04 
GeneralRe: Trigger on Replicated Database Table Pin
Tim Carmichael4-Feb-08 5:38
Tim Carmichael4-Feb-08 5:38 
GeneralRe: Trigger on Replicated Database Table Pin
Talsaniya Jayesh5-Feb-08 6:29
professionalTalsaniya Jayesh5-Feb-08 6:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.