本文整理汇总了C#中OracleDataReader.Read方法的典型用法代码示例。如果您正苦于以下问题:C# OracleDataReader.Read方法的具体用法?C# OracleDataReader.Read怎么用?C# OracleDataReader.Read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OracleDataReader
的用法示例。
在下文中一共展示了OracleDataReader.Read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadSequenceValue
private int ReadSequenceValue(OracleDataReader reader)
{
if (!reader.Read())
return 0;
return (int)(decimal)reader[SequenceValueColumn];
}
示例2: Giris_Buton
protected void Giris_Buton(object sender, EventArgs e)
{
if (Kul_TB.Text == "Admin" && Sifre_TB.Text == "Password") {
Page.Response.Redirect("MusteriKayitlari.aspx");
}
baglanti = new OracleConnection(constring);
baglanti.Open();
komut = new OracleCommand();
komut.Connection = baglanti;
komut.CommandText = "select * from t_musteri where kul_ad='" + Kul_TB.Text + "' and sifre='" + Sifre_TB.Text + "'";
rd = komut.ExecuteReader();
if (rd.Read())
{
Session.Add("kullanici", Kul_TB.Text);
Page.Response.Redirect("AfterLogin.aspx");
}
else {
Durum_Label.Text = "Giriş Başarısız..";
Durum_Label.Visible = true;
}
}
示例3: mus_sifre_cek
protected void mus_sifre_cek() {
baglanti_kur();
komut.CommandText = "select sifre from t_musteri where kul_ad='"+Session["kullanici"].ToString()+"'";
rd = komut.ExecuteReader();
if (rd.Read())
sifre = rd["sifre"].ToString();
baglanti.Close();
}
示例4: ariza_durum_cek
protected void ariza_durum_cek() {
baglanti_kur();
komut.CommandText = "select durum from t_durum where ariza_id='"+Session["ariza_id"]+"'";
rd1=komut.ExecuteReader();
while (rd1.Read()) {
durum = rd1["durum"].ToString();
}
baglanti.Close();
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
baglanti_kur();
komut.CommandText = "select durum from t_olasi_durum";
rd = komut.ExecuteReader();
while (rd.Read()) {
durum.Items.Add(rd["durum"].ToString());
}
}
示例6: mus_bilgi_cek
protected void mus_bilgi_cek() {
baglanti_kur();
komut.CommandText = "select mail,adres,cep_tel from t_musteri where kul_ad='"+Session["kullanici"].ToString()+"'";
rd = komut.ExecuteReader();
if (rd.Read()) {
mail = rd["mail"].ToString();
adres = rd["adres"].ToString();
tel = rd["cep_tel"].ToString();
}
baglanti.Close();
}
示例7: GetUser
public Users GetUser(string Email, string Wachtwoord)
{
Users Toadd = null;
try
{
Connect();
cmd.Connection = con;
cmd.CommandText = "SELECT UserID, Voornaam, Achternaam, Geboortedatum, Geslacht, Straat, Huisnummer, Postcode, Plaats,Telefoonnummer, Email, Abbonement FROM GEBRUIKER WHERE UserID=:UserID";
cmd.Parameters.Add("Email", Email);
cmd.Parameters.Add("Wachtwoord", Wachtwoord);
cmd.CommandType = CommandType.Text;
dr = cmd.ExecuteReader();
dr.Read();
}
catch
{
System.Diagnostics.Debug.WriteLine("Getting user failed");
return null;
}
finally
{
Disconnect();
}
try
{
while (dr.Read())
{
var id = dr.GetInt32(0);
var voornaam = SafeReadString(dr, 1);
var achternaam = SafeReadString(dr, 2);
var wachtwoord = SafeReadString(dr, 3);
var geboortedatum = dr.GetDateTime(4);
var geslacht = SafeReadString(dr, 5);
var straat = SafeReadString(dr, 7);
string huisnummer = SafeReadString(dr, 8);
var postcode = SafeReadString(dr, 9);
var plaats = SafeReadString(dr, 10);
var telefoonnummer = SafeReadString(dr, 11);
var email = SafeReadString(dr, 12);
var abbonement = SafeReadString(dr, 13);
Users user = new Users(id, voornaam, achternaam, wachtwoord, geboortedatum, geslacht, straat, huisnummer, postcode, plaats, telefoonnummer, email, abbonement);
}
}
catch
{
return null;
}
return Toadd;
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
mus_id_cek();
if (marka.Items.Count == 1) {
baglanti_kur();
komut.CommandText = "SELECT DISTINCT TEL_MARKA FROM T_TELEFON";
rd = komut.ExecuteReader();
while(rd.Read())
marka.Items.Add(rd["TEL_MARKA"].ToString());
baglanti.Close();
}
}
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (marka.Items.Count==1)
{
baglanti_kur();
komut.CommandText = "select distinct tel_marka from t_telefon";
rd = komut.ExecuteReader();
while (rd.Read())
marka.Items.Add(rd["tel_marka"].ToString());
baglanti.Close();
}
}
示例10: ReadSongWord
private SongWord ReadSongWord(OracleDataReader reader)
{
if (!reader.Read())
return null;
return new SongWord
{
Id = (int) reader[IdText],
Line = (short) reader[WordLineText],
Column = (short) reader[WordColumnText],
Word = new WordQuery().GetWordById((int) reader[WordIdText])
};
}
示例11: ReadGroupWord
private Group ReadGroupWord(OracleDataReader reader, out Word word)
{
word = null;
if (!reader.Read())
return null;
word = new WordQuery().GetWordById((int) reader[WordIdText]);
return new Group
{
Name = (string) reader[GroupNameText]
};
}
示例12: marka_SelectedIndexChanged
protected void marka_SelectedIndexChanged(object sender, EventArgs e)
{
model.Items.Clear();
baglanti_kur();
komut.CommandText = "Select tel_model from t_telefon where tel_marka='" + marka.SelectedItem.ToString() + "'";
rd = komut.ExecuteReader();
while (rd.Read())
{
model.Items.Add(rd["tel_model"].ToString());
}
if (marka.SelectedItem.ToString() != "Seçiniz") {
Model_Label.Visible = true;
model.Visible = true;
}
}
示例13: BuildObjects
private List<ILogItem> BuildObjects(OracleDataReader rdr)
{
var output = new List<ILogItem>();
while(rdr.Read())
{
CSELogItem temp = new CSELogItem();
temp.ID = rdr[0].ToString();
temp.UserID = rdr[1].ToString();
temp.Date = rdr[2].ToString();
temp.ProcedureName = rdr[3].ToString();
temp.Message = rdr[4].ToString();
output.Add(temp);
}
rdr.Dispose();
return output;
}
示例14: ReadPhraseWord
private Phrase ReadPhraseWord(OracleDataReader reader, out PhraseWord word)
{
word = null;
if (!reader.Read())
return null;
word = new PhraseWord
{
Id = (int) reader[IdText],
WordSequence = (int) reader[WordSequenceText],
Word = new WordQuery().GetWordById((int) reader[WordIdText])
};
return new Phrase
{
PhraseNumber = (int) reader[PhraseNumberText]
};
}
示例15: ReadRelationPair
private Relation ReadRelationPair(OracleDataReader reader, out Pair pair)
{
pair = null;
if (!reader.Read())
return null;
pair = new Pair
{
Id = (int) reader[IdText],
FirstWord = new WordQuery().GetWordById((int) reader[FirstWordIdText]),
SecondWord = new WordQuery().GetWordById((int) reader[SecondWordIdText])
};
return new Relation
{
Name = (string) reader[NameText]
};
}