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 / C++ / MFC
  4. Grid and Databases in VC.

Grid and Databases in VC.

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialcsshelpquestion
2 Posts 2 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.
  • D Offline
    D Offline
    Daniel Visan
    wrote on last edited by
    #1

    What grid does a guru use for manipulating a table(adding,inserting,deleting)? I use "DBgrid" and "Remote Data" but i dont have a good control of them. For example i dont know how to catch the exceptions like somebody insert a string in a integer field and many more. There is only VB grid documentation and i dont manage VB. There are not many examples too... If you know VC documentation or source codes about DBGrid,DataGrid, Remote Data or ADO Data let me know, please. If you integrate the one of the CodeGuru grids in databases (not only for retrieve records) please help me. I can deal with ADO and ODBC. Whats your advise, dear guru? Thanks!:|

    L 1 Reply Last reply
    0
    • D Daniel Visan

      What grid does a guru use for manipulating a table(adding,inserting,deleting)? I use "DBgrid" and "Remote Data" but i dont have a good control of them. For example i dont know how to catch the exceptions like somebody insert a string in a integer field and many more. There is only VB grid documentation and i dont manage VB. There are not many examples too... If you know VC documentation or source codes about DBGrid,DataGrid, Remote Data or ADO Data let me know, please. If you integrate the one of the CodeGuru grids in databases (not only for retrieve records) please help me. I can deal with ADO and ODBC. Whats your advise, dear guru? Thanks!:|

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Why not a grid written in C and OleDB/ODBC as DB support? Implement into a DLL a window (not especially an ActiveX), export Register/Unregister from this dll, properties and methods (as every ATL/MFC-like wizard do) as (example):

      BOOL
      GridCtl_GetColumns(
      IN HWND hwndCtl,
      OUT PGRIDCOLUMNS **ppColumns
      );

      etc., implement your own paint for header, lines, columns, cells etc.? The DB support: you can choose from the myriad of DB interfaces available (starting from ODBC and DB-Library and ending with OleDB, ADO, DAO, Newton binome of A,D and O - :) - ) and create another dll (or in the same) where you implement the "data source": in the same way, register, unregister, general properties (Server/Source, Catalog/Database etc.), methods/properties (IsBOF, IsEOF, NextRow, Query, Cancel, SetSql, RowCount, GetSql etc.), eventually expose a little rectangle with rewind, back button, in the middle a static with some informations (Connected, Row n Of N etc.) and ending with next/forward buttons (something like: "<< < Row 1 of 10 > >>"). If you need an activex, ok, the ATL object wizard should be a good starting point. Implement what you need (connection points, sinks, events, all the usual stuff). Frankly, I have seen many controls, from simple windows to ActiveX. But I never seen a grid or a data source to like. So I decided to wrote my controls (including grid) in C. It works, until now. (RO: Mai pe romaneste: ce faci cu mina ta... :) ) Cristian 'Sardaukar' Amarie

      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