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
  1. Home
  2. General Programming
  3. C#
  4. using dbf in c# .net

using dbf in c# .net

Scheduled Pinned Locked Moved C#
csharpdatabasehelptutorialannouncement
5 Posts 3 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.
  • A Offline
    A Offline
    Amar Chaudhary
    wrote on last edited by
    #1

    i tried using wizard it shows data in data adapter when i use odbcConnection1.ConnectionString --> "Dsn=Visual FoxPro Tables;database ='d:\\try\try\\reconcil and bank entry\\TRY\\DOBANK\\tables'" odbcDataAdapter1.Fill(dataSet11, "enet.dbf"); it gives error ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]database ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]SourceDB any example of using them can be helpful thanks :):)

    It is Good to be Important but! it is more Important to be Good

    B 1 Reply Last reply
    0
    • A Amar Chaudhary

      i tried using wizard it shows data in data adapter when i use odbcConnection1.ConnectionString --> "Dsn=Visual FoxPro Tables;database ='d:\\try\try\\reconcil and bank entry\\TRY\\DOBANK\\tables'" odbcDataAdapter1.Fill(dataSet11, "enet.dbf"); it gives error ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]database ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]SourceDB any example of using them can be helpful thanks :):)

      It is Good to be Important but! it is more Important to be Good

      B Offline
      B Offline
      baerten
      wrote on last edited by
      #2

      Hi, i made it like this : string conn = "Driver={Microsoft dBASE Driver(*.dbf)};DriverID=277;Dbq=PATH_TO_YOUR_DBF_FILES;"; OdbcConnection Conn = new OdbcConnection(conn); OdbcCommand Comm = new OdbcCommand("select * from xxx limit 30"); Conn.Open(); Comm.Connection = Conn; OdbcDataAdapter DA = new OdbcDataAdapter(Comm); DataSet DS = new DataSet("Table"); DA.Fill(DS); DataGrid.DataSource = DS; DataGrid.DataMember = "Table"; But somethimes it crashes, sometimes it works great ... But i read on the net thats a known bug :sigh:

      A 1 Reply Last reply
      0
      • B baerten

        Hi, i made it like this : string conn = "Driver={Microsoft dBASE Driver(*.dbf)};DriverID=277;Dbq=PATH_TO_YOUR_DBF_FILES;"; OdbcConnection Conn = new OdbcConnection(conn); OdbcCommand Comm = new OdbcCommand("select * from xxx limit 30"); Conn.Open(); Comm.Connection = Conn; OdbcDataAdapter DA = new OdbcDataAdapter(Comm); DataSet DS = new DataSet("Table"); DA.Fill(DS); DataGrid.DataSource = DS; DataGrid.DataMember = "Table"; But somethimes it crashes, sometimes it works great ... But i read on the net thats a known bug :sigh:

        A Offline
        A Offline
        Amar Chaudhary
        wrote on last edited by
        #3

        thanks :)baerten:)

        It is Good to be Important but! it is more Important to be Good

        M 2 Replies Last reply
        0
        • A Amar Chaudhary

          thanks :)baerten:)

          It is Good to be Important but! it is more Important to be Good

          M Offline
          M Offline
          mcgahanfl
          wrote on last edited by
          #4

          I think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com

          1 Reply Last reply
          0
          • A Amar Chaudhary

            thanks :)baerten:)

            It is Good to be Important but! it is more Important to be Good

            M Offline
            M Offline
            mcgahanfl
            wrote on last edited by
            #5

            I think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com

            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