1 Replies - 114 Views - Last Post: 07 February 2012 - 06:22 AM Rate Topic: -----

Topic Sponsor:

#1 Hetem  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-February 12

ODT.NET

Posted 07 February 2012 - 02:01 AM

Hi.I want select from Oracle database rows that card_no = :file_card_no .Could anybody help me
while ((line = sr.ReadLine()) != null) // dosyani okudum
                {
                    file_card_no = line.Substring(0, 20);//0  dan 20 - ya kadar karakterleri okuyorum
                    file_sms_bank_flag = line.Substring(20, 1);
                    file_sms_start_date = line.Substring(21, 8);
                    file_sms_finish_date = line.Substring(29, 8);
                    file_sms_bank_channel = line.Substring(37, 1);
                    file_phone_number = line.Substring(38, 20);
// simdi databaseden card_no file_card_no beraber olan stiri select edecem.
//Select etmede bir problem cikior.Yani ben file_card_no - ni parametre olarak sorguya gondermeliyem mi?
//Asagidaki kimi
cmd.CommandText = "select card_no , sms_bank_flag from sms_banking_orxan where card_no = :file_card_no ";

		}


MOD EDIT: Added code tags. When posting code...USE CODE TAGS!!!

:code:

This post has been edited by JackOfAllTrades: 07 February 2012 - 04:53 AM


Is This A Good Question/Topic? 0
  • +

Replies To: ODT.NET

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1451
  • View blog
  • Posts: 5,763
  • Joined: 21-March 08

Re: ODT.NET

Posted 07 February 2012 - 06:22 AM

You should add your parameter to the Parameters collection of the OracleCommand class.

cmd.Parameters.AddWithValue(":file_card_no", file_card_no);



Then execute your query.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1