BlitzData beta 2

Community Forums/Showcase/BlitzData beta 2

Kanati(Posted 2004) [#1]
Just finished rebuilding the install for BlitzData.

<link removed. see the RC6 thread.>

Here's a quick excerpt from the docs...


The BlitzData userlib is an ADO wrapper for Blitz+ and Blitz3D. Because it wraps COM objects I decided to use Visual Basic and vbAdvance to create the dll. Due to this, you will, in addition to the blitzdata.dll itself need to distribute the VB6sp5 runtimes with your finished app/game. ALSO, you will need to distribute the latest MDAC package which Microsoft has available for download (2.7 at the time of this document’s creation if I am not mistaken). This will increase the size of your distribution, but it will ensure that the end user has all required components.

Features
Connection and Connectionless database access (DSNless)
Quick access to Access/Jet(97/2000), MS SQL(7.0/2000), and Oracle databases
Access to any database that has an MDAC driver installed via a custom connection string
Easy database and table creation via code only
Easily return data on a column by column per-record basis
Easy navigation through records using simple forward and back commands
Return recordsets based on simple or complex T-SQL statements
Use the full T-SQL language (with databases that support it)
Transaction usage via simple begin, commit and rollback commands


Function List

BD_OpenDatabase%(Server$,Database$,UserName$,Password$,dbtype%)
BD_CloseDatabase()
BD_GetDatabaseState%()
BD_GetTableState%()
BD_FirstRecord()
BD_NextRecord()
BD_PreviousRecord()
BD_LastRecord()
BD_RecordCount%()
BD_SQLQuery%(query$)
BD_CloseQuery()
BD_GetColumn$(colname$)
BD_AddRecord()
BD_UpdateRecord()
BD_SetStringColumn(col$, val$)
BD_SetIntegerColumn(col$, val%)
BD_SetFloatColumn(col$, val#)
BD_BeginTransaction()
BD_RollbackTransaction()
BD_CommitTransaction()
BD_CreateJetDatabase(fname$,typ%)
BD_CreateJetTable(fname$,table$)
BD_AddJetColumn(fname$,table$,col$,typ%,siz%)
BD_SendSQLCommand(sql$)


The new build of the install includes a readme file telling how to install the dll and decls file for those that don't know, a few tiny (very tiny) quick and dirty little test programs that show how to use a few of the basic functions, and a constants file so you don't have to remember a bunch of cryptic numbers.

Kanati


Wayne(Posted 2004) [#2]
Looks nice, but it's missing the BlitzData.dll


Kanati(Posted 2004) [#3]
Hate to have you download it again, but I updated the build again and installed it on my work machine. It's there (it's still listed in the build in two places, but only gets installed once for some reason).

Beta 4... Beta 3 installer blew up on take-off. Had to scuttle it. :)


Kanati(Posted 2004) [#4]
Also... I seem to have forgotten to include an entry in the start menu.

It's installed to Program Files/STONEhenge Software/BlitzData 1.0

The dll and decls file are in a subdirectory called "MoveToUserlibs". Only move the contents. Not the actual movetouserlibs directory.


Kanati(Posted 2004) [#5]
Just put this and blitzprinter over on blitzcoder. Maybe it'll get a bit more interest over there.


Wayne(Posted 2004) [#6]
Thank you Kanati I appreciate both.


Caligula(Posted 2004) [#7]
Kanati - Thanks so much for this! I have been looking for a way to integrate Blitz with Access, and this looks very promising. Great Job!


Kanati(Posted 2004) [#8]
Note: If you do not close the resources that you open (BD_CloseQuery() and BD_CloseDatabase()) your program WILL crash or hang when it ends.

do NOT forget this as it's not readily apparent when it happens as to WHY it happened. I might be able to put some "hey stupid" code in so that if the programmer doesn't take this into account, the dll will do a nice, orderly cleanup, but right now I'm not sure how. I'll look into it though.


Kanati(Posted 2004) [#9]
there appears to be a bug with BD_SetIntegerColumn()... working on it.


Wayne(Posted 2004) [#10]
argh, nice work, keep us posted on the bug.


Kanati(Posted 2004) [#11]
Oh fer gawd's sake... I'm such a tard.

There's nothing wrong with BD_SetIntegerColumn(). The problem was between the back of my chair and the keyboard.

"SELECT NAME FROM PROFILES" as a dataset does NOT mean that I can update anything other than NAME. But I didn't even bother checking my dataset to make sure I had the correct set chosen. "SELECT * FROM PROFILES" (after rebuilding the dll about 2903428475394 times) in the blitz program and it works just fine.

Having said that... I will be adding a "debug" mode to the dll so that if an error occurs in the future it will pop up a messagebox showing the actual ADO error that caused the problem. This should help debugging go a lot smoother.

To recap... No bug. It worky just fine! Expect RC5 tonight or tomorrow with debug mode included.

Kanati


Wayne(Posted 2004) [#12]
hooray !