Thanks for any value added feedback.
--
- Steve
"DDG" <nospamm...@cableone.net> wrote in message
news:Xns96AED082D168An...@216.168.3.44...
Were I writing an application to be installed on each user's computer to
access a database on a network, I'd use PowerBASIC/Windows.
Then again, I've been using PB/Windows/database for five years, so it's no
big deal. But when I first started database access, learning the ODBC API
was a dog of a job. There are some third-party tools to ease the load (e.g.,
PerfectSync's SQL Tools), and with the current versions of the compilers
there is a COM interface. There's also (now, not then!) a large collection
of code posted at PowerBASIC's web site from which to start.
In general, PowerBASIC is not a "point and shoot" tool. It provides a very
reliable platform to make calls to the Windows' API. Microsoft's Visual
Basic has a much, much simpler programmer interface to database access. If
you are in fact a 'newbie' and just starting with Windows programming, be
prepared to invest a lot of time getting this to work correctly if you want
to write a program using PB/Windows..
--
Michael Mattias
Tal Systems, Inc.
Racine WI
mmat...@talsystems.com
Blue Flash wrote:
>Looks like everybody died in here....
There is an official comp.* PowerBASIC newsgroup, so this alt.*
group is obsolete. I still crosspost here just in case someone
hasn't gotten the news, but comp.lang.basic.powerbasic is the
place to be.
Michael Mattias wrote:
>Were I writing an application to be installed on each user's computer to
>access a database on a network, I'd use PowerBASIC/Windows.
>
>Then again, I've been using PB/Windows/database for five years, so it's no
>big deal. But when I first started database access, learning the ODBC API
>was a dog of a job. There are some third-party tools to ease the load (e.g.,
>PerfectSync's SQL Tools), and with the current versions of the compilers
>there is a COM interface. There's also (now, not then!) a large collection
>of code posted at PowerBASIC's web site from which to start.
>
>In general, PowerBASIC is not a "point and shoot" tool. It provides a very
>reliable platform to make calls to the Windows' API. Microsoft's Visual
>Basic has a much, much simpler programmer interface to database access. If
>you are in fact a 'newbie' and just starting with Windows programming, be
>prepared to invest a lot of time getting this to work correctly if you want
>to write a program using PB/Windows..
Visual basic is an erector set or a set of Lego Blocks.
PowerBASIC is a fully-equipped machine shop.
I've got both this NG and comp.lang.basic.powerbasic on my list... but
there doesn't seem to be a lot of difference. It's good to know at least
which one is the "official" site.
Got that DDG???
--
- Steve
"Guy Macon" <_see.web.page_@_www.guymacon.com_> wrote in message
news:11hc9ut...@corp.supernews.com...
Perhaps, but the MS-VB "program code needed to work with databases" is a
hell of lot easier to read, write and understand than is the ODBC API.
I think it's something like (I don't write in VB)...
DIM DB AS DatabaseObject, RS as RecordSet
DB.ConnectString = "connection string" ' need this for ODBC , too
Connected = DB.Connect (DB)
IF Connected then
DB.Statement = "SQL statement"
DB.Execute DB.Statement, RS
FOR Z = 1 TO RS.NumRows
MyRecord = RS (Z).rowdata
(do stuff with MyRecord)
NEXT
RS.Close
DB.Disconnect
END IF
I have the same 'connnect, execute, retrieve results, close, disconnect'
functions in my personal #INCLUDE file but it took me about 1000 lines of
code to make it so.
MCM
> Thanks Guy!
>
> I've got both this NG and comp.lang.basic.powerbasic on my list...
> but
> there doesn't seem to be a lot of difference. It's good to know at
> least which one is the "official" site.
>
> Got that DDG???
Ok - I thought the site seemed dead. I'll unsubscribe and look at the
other but last time I looked it was about as eventful as a tombstone.
- Again glad to know the site is alive.
:)
Michael Mattias wrote:
>
>"Guy Macon" <http://www.guymacon.com/> wrote...
>>
>> Visual basic is an erector set or a set of Lego blocks.
>>
>> PowerBASIC is a fully-equipped machine shop.
>
>Perhaps, but the MS-VB "program code needed to work with databases" is a
>hell of lot easier to read, write and understand than is the ODBC API.
Of course it is. calling VB "an erector set or a set of Lego blocks"
is not in any way a putdown or criticism. It is an attempt to convey
the fact that VB was designed to do some things so easily that doing
them is like snapping together Lego blocks.
On the other hand, while VB is able to do some things (some of them
quite sophisticated, which is where the Lego analogy breaks down)
very easily, there are some other things that it is very, very hard
to do in VB. You don't see anyone doing real-time control of embedded
hardware in VB -- PB is far better for that. You don't see anyone
writing entire operating systems in VB -- C/C++ is far better for that.
They are different tools designed to address different kinds of problems.
Hammers are a poor choice for cutting wood and saws are a poor choice
for driving nails -- and neither is a good choice for tightening bolts.
One must also keep in mind that in this particular example the deck
is stacked. The title of this thread mentions an *Access* database.
Is it any wonder that Microsoft Visual Basic works well with Microsoft
Access?
I am not a database sort of person (my tastes run more towards industrial
robots and electronic toys), but isn't SQL Tools by Perfect Sync a better
way of working with databases than "rolling your own" in PowerBASIC alone
*or* Visual Basic alone? See http://perfectsync.com/SQLTools.htm
--
Guy Macon <http://www.guymacon.com/>
DDG wrote:
Here are some tutorials that should get you going:
Introduction:
http://www.webwizguide.com/asp/tutorials/what_is_asp.asp
http://www.webwizguide.com/asp/tutorials/first_asp_page.asp
Working with an Access Database:
http://www.webwizguide.com/asp/tutorials/connecting_to_a_database.asp
http://www.webwizguide.com/asp/tutorials/connecting_to_a_database_pt2.asp
http://www.webwizguide.com/asp/tutorials/add_to_database.asp
http://www.webwizguide.com/asp/tutorials/add_to_database_pt2.asp
http://www.webwizguide.com/asp/tutorials/deleting_data_from_database.asp
http://www.webwizguide.com/asp/tutorials/deleting_data_from_database_pt2.asp
http://www.webwizguide.com/asp/tutorials/updating_data_from_database.asp
http://www.webwizguide.com/asp/tutorials/updating_data_from_database_pt2.asp
http://www.webwizguide.com/asp/tutorials/updating_data_from_database_pt3.asp
http://www.webwizguide.com/asp/faq/access_database_faq.asp
Or you can try using the Database Interface Wizard in FrontPage:
http://www.microsoftfrontpage.com/content/ARTICLES/dbpower.html
http://msdn.microsoft.com/library/en-us/odc_fp2003_ta/html/odc_FPUsingDIWwFP.asp?
SQL Tools is what it is: a tool. It provides the 'wrapper' functions so the
syntax required of the programmer is a lot less complex than that required
to make all the required calls to the ODBC API. It's either worth the cost
to you or it isn't.
In general I'm not much of a 'tools' user anyway. The only tools libraries I
use at all are Don Dickinson's ddoc Print and Preview (Windows printing plus
on-screen print preview) and PowerBASIC's PowerTree (index manager).
While *today* I could do my own printing, when I first needed to print, I
was new to Windows itself, leave alone new to Windows printing; at only
twenty-five bucks for a ddoc P&P developer license, no way I could have
gotten my first printing application working for less than that.
The PowerTree license I bought during one of PB's sales two-three years ago
(I think it was only ninety-nine bucks during that sales promotion). But it
was just a couple of weeks ago I actually included it in one of my
applications. (Somewhat inexplicably to me, PT does not support the creation
of indexes which permit duplicate keys.. but DOES require the keydata be
supplied when deleting a key. Go figger)
The index management I don't think I could have done myself in less than two
months. Besides, I had used other index managers back in my MS-DOS days, and
as a COBOL programmer for a number of years, the whole concept of doing
indexed I-O simply by making a limited number of function calls ( NOT having
to code up the tree algorithms) was already burned into my brain, so
investing in this tool made a lot of sense.
FWIW, both these libraries are IMO terrific values, even though both suffer
from weak documentation.
MCM
My error, I have this backwards.
PowerTree does not allow the creation of indexes which specify keys must be
UNIQUE. (i..e, "add" would return 'failure' on duplicate key).
So requiring the keydata to specify the key to be deleted *does* make sense
prior to doing a delete!
MCM