BlitzData 1.2 RC8

Community Forums/Showcase/BlitzData 1.2 RC8

Kanati(Posted 2004) [#1]
Here's the latest decls file. You'll note a few more commands at the end of it. I have to redo a few of the docs and rebuild. I'll have that within the hour.

;Declarations file for blitzdata.dll

.lib "BlitzData.dll"
BD_OpenDatabase%(Server$,Database$,UserName$,Password$,dbtype%):BD_OpenDatabase
BD_CloseDatabase():BD_CloseDatabase
BD_GetDatabaseState%():BD_GetDatabaseState
BD_GetTableState%():BD_GetTableState
BD_FirstRecord():BD_FirstRecord
BD_NextRecord():BD_NextRecord
BD_PreviousRecord():BD_PreviousRecord
BD_LastRecord():BD_LastRecord
BD_RecordCount%():BD_RecordCount
BD_SQLQuery%(query$):BD_SQLQuery
BD_CloseQuery():BD_CloseQuery
BD_GetColumn$(colname$):BD_GetColumn
BD_AddRecord():BD_AddRecord
BD_UpdateRecord():BD_UpdateRecord
BD_SetStringColumn(col$, val$):BD_SetStringColumn
BD_SetIntegerColumn(col$, val%):BD_SetIntegerColumn
BD_SetFloatColumn(col$, val#):BD_SetFloadColumn
BD_BeginTransaction():BD_BeginTransaction
BD_RollbackTransaction():BD_RollbackTransaction
BD_CommitTransaction():BD_CommitTransaction
BD_CreateJetDatabase(fname$,typ%):BD_CreateJetDatabase
BD_CreateJetTable(fname$,table$):BD_CreateJetTable
BD_AddJetColumn(fname$,table$,col$,typ%,siz%):BD_AddJetColumn
BD_SendSQLCommand(sql$):BD_SendSQLCommand
BD_SetDebugMode(mode%):BD_SetDebugMode
BD_DeleteRecord():BD_DeleteRecord
BD_RecordSetBOF%():BD_RecordSetBOF
BD_BOF%():BD_BOF
BD_RecordSetEOF%():BD_RecordSetEOF
BD_EOF%():BD_EOF
BD_ColumnName$(ord%):BD_ColumnName
BD_ColumnCount%():BD_ColumnCount
BD_ColumnDataType%(colname$):BD_ColumnDataType
BD_ColumnSize%(colname$):BD_ColumnSize
BD_SetCacheSize(csize%):BD_SetCacheSize
BD_GetCacheSize%():BD_GetCacheSize
BD_SetBookmark(ord%):BD_SetBookmark
BD_ReturnToBookmark(ord%):BD_ReturnToBookmark
BD_ClearBookmark(ord%):BD_ClearBookmark
BD_GetLastError%():BD_GetLastError
BD_GetLastErrDesc$():BD_GetLastErrDesc



Kanati(Posted 2004) [#2]
Here's the latest build...

If you can, uninstall previous versions and use the installer for this one. I think everything is complete and works now, but I'd like someone to test it and make sure.

http://www.outergods.com/blitz/blitzdata12r8b.zip

And here's the "update" zip that has only the dll and decls file.

http://www.outergods.com/blitz/blitzdataupd.zip

Lemme know how it goes. If it works for you all I think I might call it finished and move on to my game again. :)

Kanati

(oh, and you'll note that the install has been cut down to 4 meg.)


Wayne(Posted 2004) [#3]
Last update broke it!
BD_CloseQuery() causes error:
Object variable or with block variable not set (91)


Kanati(Posted 2004) [#4]
GACK!!! That's because of the bookmark code I put in too. Crap.

Looking right now.


Kanati(Posted 2004) [#5]
oops... Would have broke BD_ClearBookmark() too.

Fixed.

The blitzdataupd.zip file contains build 109. The blitzdata12r8b contains the full install rebuilt with fix.

Kanati


Wayne(Posted 2004) [#6]
Works much better now. Thanks


Kanati(Posted 2004) [#7]
I removed the Set and GetMaxRecords() commands I had added since you can set that in the query itself with "SELECT TOP XX". No need to overcomplicate things. But other than that I think this will be the final commandset for BlitzData. Anything else will probably be put on hold until I finish my game (unless I find I need it for the game itself) and version 2.0 at some indefinite time in the future (kinda like BlitzMax hehe :) )

So have at it... beat the snot out of it... and lemme know if you find any buggers.

Kanati


Wayne(Posted 2004) [#8]
What about:
BDGetQueryTimeOut%()
BDSetQueryTimeOut%(Seconds%)

Not sure what would happen if I ran a long query.
Don't want it to error out.

8)

I think were damn close, if not there now.


Kanati(Posted 2004) [#9]
I will look into that... It MIGHT make me revise the commandset but I've never had a query timeout, and I've ran it against a table with 3 million records. But POSSIBLY if you are doing a few joins.........

I'll look into it.

Kanati


Wayne(Posted 2004) [#10]
ADO objects default to a 30 second command timeout, any command that takes longer will terminate the connection and the command.
Some queries take longer than 30 seconds, so it's nice to be able to adjust it up a bit to prevent the time out error, or set it to zero to take as long as it pleases.

CommandTimeout Property

Indicates how long to wait while executing a command before terminating the attempt and generating an error.
Settings and Return Values

Sets or returns a Long value that indicates, in seconds, how long to wait for a command to execute. Default is 30.
Remarks

Use the CommandTimeout property on a Connection object or Command object to allow the cancellation of a command due to delays from network traffic or heavy server use. If the time from the CommandTimeout property setting elapses prior to execution of the command, an error occurs and ADO cancels the command. If you set the property to zero, ADO will wait indefinitely until the execution is complete. Make sure the provider and data source to which you are writing code supports the CommandTimeout functionality.

For Connection objects, the CommandTimeout property is read/write.

When you use CommandTimeout on a Connection object, you set a global value for all commands executed and all recordsets opened on that connection. You can override this value for a specific command by setting the CommandTimeout property of the appropriate Command object.


Thanks for looking into it.

Wayne


Wayne(Posted 2004) [#11]
Thank you again Kanati, for giving us a great tool to use with Blitz3d.

-Wayne


Kanati(Posted 2004) [#12]
Unfortunately... The ONLY place I use the command object is in BD_SendSQLCommand() and I don't allow for it returning the single recordset that I give access to.

CommandTimeout and ConnectionTimeout aren't available to me in the recordset object (I use recset.Open "",...) to get the recordset. I can certainly change this but it would require me to rewrite almost all of my commands that use the recordset.

There's a lot of benefit to using the command object to return a recordset. Threre's a lot of options to run stored procedures and such.

So for now... I'm going to have to say no to the timeout thing. I will revist the issue though and rewrite the entire library.

Planned To Do:

Timeout implementation on queries, commands, connections
Metadata access
Here's the biggie... Multiple recordsets and connections.

But. I'm going to work on my game first so I'm thinking it's about 3 months out.

However, any bugs you find in this will be addressed promptly. Just let me know. I'll give it a few more days for any bugs found, and in the meantime I'll finish up docs. Make a few real demo programs for samples. And polish it up a bit before I release it in it's final form.

Kanati


Wayne(Posted 2004) [#13]
Arghhhh no command object.

Yes, would be a rewrite, *smack* use command object next time. Let me know if you need any sample code or help with command object in the future.

8)

The default command timeout of 30 seconds will do for now.
At least we have blitzdata and SQL is possible now!

Looking forward to final release.

Thank you Kanatu, nice job bro!


Wayne(Posted 2004) [#14]
Send me some email, or post a message on a new thread if you need any help testing, or need code donations for your game.

Also feel free to include any info, code samples, or connection strings I've posted into your final build.


-Wayne


Kanati(Posted 2004) [#15]
Will do. I really didn't even think about using the command object in the beginning. When I do a rewrite I will most definitely use it as the "core" object type instead of the recordset.

Kanati


Maddog(Posted 2005) [#16]
Kanati,

Could you tell me how I open a MS Access database? I mean what should I put in the BD_OpenDatabase function? I run the acces database local on the same pc I run blitzbasic, so I thought I don't have to supply a server, password or anything, just the path and name to the database and the type of database, but I keep getting an error.
Could you give me an code example on opening an MS Access database?

Thanks in advance,
Andrik


DH(Posted 2005) [#17]
These links dont work anymore, anyone have these files? I will store them publicly on my server if I can get them.


Maddog(Posted 2005) [#18]
Darkhalf,

You can find the files at:
www.sportbikemods.com/blitz/blitzdata14rc1.zip
www.sportbikemods.com/blitz/blitzdataupd.zip

I posted before you about how to use an MS access database, do you have any idea?

best regards,
Andrik


Ferret(Posted 2011) [#19]
Does anyone still have these files?

If allowed, i will put them on mi website.


LineOf7s(Posted 2011) [#20]
http://downloads.lineof7s.com/blitzdata141.zip
http://downloads.lineof7s.com/blitzdataupd.zip


Ferret(Posted 2011) [#21]
Thank you!

I also uploaded the files here,
http://www.jferretdesign.be/blitz-3d.php


Ferret(Posted 2011) [#22]
The first file contains a installer wich installs a lib called blitz printer?
The second one, the update, contains blitz data dll and decls file but no examples.

Is the first file correct?


LineOf7s(Posted 2011) [#23]
Okay, I have bad news and bad news.

That copy of the Blitz Data file is the only one I have and the only one I can find lying about teh internets anywhere. Despite all the references to BlitzData in the filename, the installer and the readme file, it does indeed install the Blitz Printer library. Rats! Foiled again!

The worse news is related to this post I discovered but moments after emailing Kanati in an act of desperation. I'll repost it here for future reference (this was posted a year ago - around 2010).

http://www.blitzmax.com/Community/posts.php?topic=87118#987330

I recently got an email from someone in regards to the old toolbox/printer libraries that I had put out. I tend to get one or two of these per year so I figure since I've been fiddling with blitz again for a while I'd let people know that

a) I don't have the old code any more for those libraries.

b) They do NOT work under the new versions of blitz (1.34 for certain).

c) Unless I get more interest than 1-2 persons per year, I probably won't revisit the libraries. I still think that blitz had a need for printer libraries... But there just isn't enough interest for me to bother with writing a new one from scratch.

d) The mersenne twister random number generator SHOULD still work under all versions of blitz. I just put that in the toolbox if anyone wants it.

Other than that... I got nothin. Resume your normal day-to-day lives. :)

Kanati




LineOf7s(Posted 2011) [#24]
Better news!

I've been in contact with the ever-helpful Kanati, and he tells me that despite the Blitzdata zip above actually being BlitzPrinter, the update zip file above contains everything you need to get going (except examples - but if you need some of those chances are there are threads around discussing how to use it (no, I haven't looked)).