Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: ODBC getting specific row

  1. #21
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Blog Entries
    1
    Rep Power
    156

    Re: ODBC getting specific row

    Quote Originally Posted by John Spikowski
    I would like to see the thinBASIC community take a serious look at creating a ODBC extension module that is easy to use. Sooner or later you will need to move beyond spiffy games.
    John if its that important to you then why dont you write the ODBC module?

    Some people have no interest in ODBC, now you have pointed out my error I will rewrite my windows key revealer to use OBDC because thats just what it needs.

    off to write somemore spiffy games now.
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  2. #22

    Re: ODBC getting specific row

    John if its that important to you then why dont you write the ODBC module?
    Michael,

    I do very little development under Windows anymore. I use the MySQL C API interface for most my DB needs. I suggested the ODBC module for thinBASIC as it gives the Windows programmer a greater selection of client options and Microsoft includes the management tools as part of the OS.

    Maybe I was a bit harsh with the "something more then games" comment but without DB support, it really limits thinBASIC's use for most utility based applications which I assume was the void thinBASIC was trying to fill. If the direction is something else, my apology.

    John
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  3. #23
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: ODBC getting specific row

    TOPIC MOVED to ODBC specific forum.
    _________________________________________________

    In DBMS record position inside the DB has no meaning because the position where the record is stored is demanded to the DBMS engine. And decision to where to store data is subject to many factors: from DBMS engine rules to optimization factors.

    What is important in order to be able to identify your data is a KEY: a value (or a set of values) used to retrieve or connect other info in the DBMS or in outside references. Usually an auto increment unique field counter maintained by the DBMS itself is enough. Many applications instead use counters plus personalized fields (like, for example, a RecordID) maintained by personalized counters: InvoiceNumber, OrderNumber, CustomerID, PaymentCode, ...
    Once you have identified your main data with a SELECT statement returning just one row, you will use whatever ID stored in your main record to retrieve data from other source of info: related tables in the same or other DB or external info.

    In designing DB, a great attention must be placed to KEYs and ID. In the posted example, record number should be replaced with the concept of KEY field so something like:
    record 1 = mike
    record 2 = eros
    record 3 = frank
    record 4 = roberto
    record 5 = petr

    should be replaced with something like
    RECID, UserName, ...
    1, mike, ...
    2, eros, ...
    3, frank, ...
    4, roberto, ...
    5, petr, ...

    Where RECID is a unique identifier (in this case a DBMS maintained counter is OK) used to link every user with it's data and to other sub data in linked tables ( [wiki=Relational_model]Relational_model[/wiki]) or in external references.

    I will try to write down an example using an auto increment counter and post here.

    Regarding why I followed Josť way to interface with ODBC is exactly because it is low level interface with API and if you get it, you get ODBC in one go. After that you can write any wrapper. But if there will be real interest, I can think to write a specific thinBasic module.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Page 3 of 3 FirstFirst 123

Similar Threads

  1. A little more help with ODBC
    By marcuslee in forum Fixed or cleared errors in help material
    Replies: 8
    Last Post: 04-09-2008, 19:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •