Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. objOleDbDataAdapter.Fill(objDataSet, tableName); with sybase

objOleDbDataAdapter.Fill(objDataSet, tableName); with sybase

Scheduled Pinned Locked Moved C#
helpquestiondatabaseoraclecom
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codeadair
    wrote on last edited by
    #1

    HI,all. Today, when i want to get data from sybase table. i have puzzled with a strang thing. just like the title. when the program runs to the point, my program dipped into it. the program will not run to the next statement and also with no error threw out. what is wrong? how could i get data from sybase table as i getting from oracle. by the way,i could do insert,update,delete operating in my program.and one thing else,when i use oleDbDataReader to read data from sybase table, another problem happens,when i do "myReader.Close();".the same thing happens,the program will not go to next statement. Here is my part codes: public int LoadDataSetFromSYBASE(string sql, string tableName, ref DataSet objDataSet) { this.sybase_Connect(); int iCount = -1; OleDbDataAdapter objOleDbDataAdapter = new OleDbDataAdapter(sql, this.sybase_con); try { iCount = objOleDbDataAdapter.Fill(objDataSet, tableName); } catch(Exception e) { throw (new Exception("Error in LoadDataSetfromSYBASE method. " + e.Message)); } finally { this.sybase_Disconnect(); } return iCount; } public void LoadDataFromSYBASE(string sql,object obj) { using (OleDbConnection connection = new OleDbConnection(sybase_ConnectionString)) { OleDbCommand command = new OleDbCommand(sql, connection); connection.Open(); OleDbDataReader reader = command.ExecuteReader(); reader.Read(); obj=reader[0]; reader.Close(); } }

    MSN:msnadair@hotmail.com Skype:skyadair

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups