Announcement

Collapse
No announcement yet.

ODBC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ODBC

    Hi!

    What about using ODBC in PB/DLL 6? Are there any samples and includes available?

    We plan to use PB/DLL for a CGI project and we need access to some databases over the ODBC interface.

    Usually we take VB, but PB/DLL may the better choice for a cgi application.

    Bye,
    Christian

  • #2
    Christian,
    I purchased 'SQLTools' from a company called Perfect Sync. Their web site is:

    http:\\www.perfectsync.com\DevelopmentTools.htm

    I've used it for about 3 months and it's really, really good and very fast. Using a dBase V ODBC format it's a least 4 or 5 times faster than the native database system I was using before. It's also very complete and has a *huge* help file to get you started. I use it with PB/DLL 6.0 and PB/CC 2.0, but your not limited to those.

    HTH,
    --Bob
    "It was too lonely at the top".

    Comment


    • #3
      This why it's more and more becoming VB, just my opinion.

      Comment


      • #4
        EB, Please explain: What is "more becoming VB" ?

        Lance
        PowerBASIC Support
        Lance
        mailto:[email protected]

        Comment


        • #5
          Bob --

          Thanks for the kind words!

          -- Eric

          "Not my circus, not my monkeys."

          Comment


          • #6
            Christian --

            Our "SQL Tools" add-on for the PowerBASIC compilers provides a very complete, robust, easy-to-use, encapsulation of the ODBC API. Our web site contains a complete list of the ODBC and SQL features that we support, and I think you'll see that virtually everything is covered...

            http://perfectsync.com/sqltools.htm

            While it would be possible to make the ODBC API calls directly from your PowerBASIC program (in fact, SQL Tools was created with the PB/DLL compiler, so it can definitely be done) it would take a very long time to duplicate the functionality and reliability that we can provide.

            -- Eric Pearson, Perfect Sync Software



            [This message has been edited by Eric Pearson (edited 08-10-99).]
            "Not my circus, not my monkeys."

            Comment


            • #7
              Eb,

              The nice thing about an 'Add-On' is that you *don't* have to use it. But....if you have to port over information from one database system to another as I have to do, why not use a tool that speeds the process up.

              If it was huge, I might resist, but a 56k DLL is an easy decision. With a few lines of code (less than 10k compiled) the customer's problem is solved!

              Had I had to use ODBC and PowerBASIC without SQL Tools, the customer would of had his data ported over....much later and at a much higher cost.

              Sometimes you have to go with the flow.

              --Bob
              "It was too lonely at the top".

              Comment


              • #8
                Like i said, just my opinion.

                I bought PB in the first place to have not the registry troubles as in VB.
                (Almost a daily problem on some NG's)
                Further more i really like the thought of building 1 single EXE.

                ODBC can be done with PB code (as far as i know), this is something i want to do next year.
                A DLL is in my eyes again another file to take care of, sure if it's that good you should know yourself.
                We also gonna make use of Spread in our future apps, yep a DLL.

                My answer is not about required files, it's more the easyness to take a DLL instead of using PB code. (assuming the same behaviour/speed)
                Might be wrong here.

                Bye.



                [This message has been edited by E B Knoppert (edited 08-10-99).]

                Comment


                • #9
                  I understand your concerns. However, as you can now place your DLL's in your own directory (you are not limited to placing DLL's into the WINDOWS and WINDOWS\SYSTEM directory as you used to do), then the problems are reduced. I say reduced, because issues of mixed versions and prior-loaded DLL's are a potential concern.

                  DLL's are a fact of life in many complex applications, I'm afraid. If you write your own, then you can at least exert more control over the situation.

                  Lance
                  PowerBASIC Support

                  [This message has been edited by Lance Edmonds (edited 08-11-99).]
                  Lance
                  mailto:[email protected]

                  Comment


                  • #10
                    Lance,

                    What can I expect in the way of DB access from PB? That sounds vague I know but I notice that there are ODBC inc files for PB and am about to start playing around with DB access which is pretty simple in VB. I'd be a little dissapointed to find out that in order to read from a DNS I had to buy third party software or produce reams of code for basic functionality.
                    I aggree with EB at this stage (the stage of not having written anything ODBC that is ) in saying that being able to handle these sorts or things "Inline" without too much fuss is a reason I got away from VB. I don't want to distribute 3rd party software with my app.

                    Any good examples I'm missing out on? I did a search here and this is the only thread that popped up!


                    ------------------

                    Paul Dwyer
                    Network Engineer
                    Aussie in Tokyo
                    (Paul282 at VB-World)

                    Comment


                    • #11
                      I'm not aware of any plans to introduce ODBC natively into PowerBASIC at this time - but then, who knows what we may do in the future! We are always open to suggestions, and I'll pass your request along to R&D.

                      As of today, you have at least two choices for ODBC ... low-level ODBC API calls, or use a 3rd-party library like SQLTOOLS.

                      There is some ODBC code on the FILEs section of the PowerBASIC web site... http://www.powerbasic.com/files/pub/pbwin/database/

                      Also, have you searched this BBS for "ODBC"? There are at least 3 ODBC examples in the Source Code Forum.

                      One of the "regulars" to this BBS (although I don't recall who) had some ODBC code available on his own website, but this could be the same code uploaded to our server.



                      ------------------
                      Lance
                      PowerBASIC Support
                      mailto:[email protected][email protected]</A>
                      Lance
                      mailto:[email protected]

                      Comment


                      • #12
                        Well at the other hand, sql tools is very small (i think) compared with the ~8mb ODBC installation.
                        (MDAC_TYPE)
                        Your customers need to have ODBC installed in the first place!



                        ------------------
                        [email protected]
                        hellobasic

                        Comment


                        • #13
                          Search for "jazzage". With this product, you can use RDO/ADO.

                          ------------------
                          Ron

                          Comment


                          • #14
                            actually i'm doing well now ,

                            i got a good start here from http://www.powerbasic.com/support/pb...ad.php?t=22626
                            thanks ralph, you're a legend!
                            and i downloaded the api info for odbc from msdn and i can grab the contents
                            of a table/recordset now. when i've tidied up my code a little more over
                            the next few days i'll post it.

                            i think a lot of people coming to pb from vb have had odbc problems (at least
                            i'd like to think it's not just me ) and it's not actually too hard once
                            you've seen some samples working.

                            hope to post soon

                            paul

                            ------------------

                            paul dwyer
                            network engineer
                            aussie in tokyo
                            (paul282 at vb-world)

                            Comment


                            • #15
                              Pffffft only 2 weeks work (:



                              ------------------
                              [email protected]
                              hellobasic

                              Comment


                              • #16
                                How do you send a demo to a person that
                                doesn't even know what ODBC is?
                                Is there a sure-fire way to distribute some ODBC
                                driver that is easily installed across all platforms.

                                I'd still use the old Btrieve 5.10 format if possible.
                                Can't seem to be able to break away from using Btrieve
                                with so many DOS users still using it. Would it be
                                possible to use Btrieve 5.10 on one terminal and
                                SQL Tools and ODBC on others?



                                ------------------
                                How long is an idea? Write it down.

                                Comment


                                • #17
                                  Mike --

                                  > How do you send a demo to a person that
                                  > doesn't even know what ODBC is?

                                  It depends on what you're doing. For example, if your app ties into an existing Access or SQL Server database, then you simply give your customer instructions for installing the ODBC drivers that come with those products. It's very easy, you just run the Access installation program and select the components you want to install. On the other hand, if you are accessing a less popular database, you may need to obtain a redistributable driver from the company that developed and sells the database.

                                  > Is there a sure-fire way to distribute some ODBC
                                  > driver that is easily installed across all platforms.

                                  If by "all platforms" you mean "all versions of Windows"...

                                  Microsoft was pretty picky about people re-distributing their standard MDAC_TYP package, but I understand that in recent months they have relaxed their rules and it may now be ok for you to distribute it with your apps. (This is not intended to be legal advice, you are responsible for reading the re-distribution conditions and deciding whether or not your application qualifies.) MDAC_TYP stands for "Microsoft Data Access Components - Typical", and it contains a set of standard ODBC drivers. It can be downloaded free from microsoft.com. (Worst case, your customers would have to download it themselves. You can simply tell your customers that they need to download and install a Windows add-in component from Microsoft.)

                                  > Would it be possible to use Btrieve 5.10
                                  > on one terminal and SQL Tools and ODBC
                                  > on others?

                                  The short answer is "Yes". The long answer is "Usually, but you need to make sure that your database supports that. Most do."

                                  -- Eric



                                  ------------------
                                  Perfect Sync: Perfect Sync Development Tools
                                  Email: mailto:[email protected][email protected]</A>

                                  "Not my circus, not my monkeys."

                                  Comment


                                  • #18
                                    Mike --

                                    More info...

                                    I have MDAC_TYP installed on my development machine, and it lists the following standard ODBC drivers:

                                    Access
                                    dBase
                                    Excel
                                    FoxPro
                                    Oracle
                                    Paradox
                                    Text Files
                                    Visual FoxPro
                                    SQL Server

                                    Since Btrieve isn't on the list, you'd need to locate a redistributable ODBC driver for Btrieve.

                                    -- Eric


                                    ------------------
                                    Perfect Sync: Perfect Sync Development Tools
                                    Email: mailto:[email protected][email protected]</A>

                                    "Not my circus, not my monkeys."

                                    Comment

                                    Working...
                                    X