| |
KISTech Studios Home
DBConn - ODBC Database
Plugin
This plugin is FREE for personal and
commercial use.
Download 1.0.15
Release Notes: 1.0.0 - Initial Release 1.0.15
- Fixed : Dataset was not being reset properly, so any data retrieved
after the first SELECT would end up in the wrong position within the
dataset.
DBConn is a freely available ODBC Database Plugin
for DarkBASIC Professional written in C# 2008 .Netand converted using ZKat8It's .Net DLL
Converter which can be found at http://www.virtualdarkarts.com.
DBConn is
designed to allow you to access any database file, system, or server that
has an ODBC compliant driver. It has been tested with Microsoft SQL
Server, MySQL Server using the MySQL ODBC Driver v3.51, and with a
Microsoft Access 2000 mdb file.
When you first use DBConn, you must use
the DBConnect command first. This sets the connection string to your
database, opens the connection, verifies that it worked, and returns a
result code letting you know whether it connected or not. If it did
connect, then that connection remains open until one of 3 things happens.
1. The connection times out on it's own, and the ODBC driver closes it. 2.
You close it by ending your program. 3. You
use the DBConnect command again, in which
case it will close the current connection and open a new connection with
the connection string you supply.
While the connection is open, DBConn will
let you use the other commands to access your data without having to
re-open the database every time. If the connection should close on it's
own due to a timeout, the other commands first check to make sure the
connection is open, and if it isn't, the connection is automatically
re-opened, and then your command is processed. This method saves you a lot
of time. You don't have to worry about the status of the connection. Just
set the connection string once, and the rest is all handled for you. The
connection drops when it's not in use, but stays open during periods of frequent usage.
Due to this feature, it is not
recommended to use this DLL for a client/server application where multiple
clients will be accessing the database server, as you might run out of
available connections on the
database
server.
DBConn Commands
DBConnect -- Connects to
the database and sets the connection string
DBExecute -- Executes a NON-QUERY SQL statement
on your
database
These would be commands that don't return a dataset,
such
as INSERT or DELETE.
DBRunSQL -- Executes a QUERY SQL statement
on your database.
This
command returns the number of rows that it has
retrieved
from your query, and has stored those results in a
persistent
dataset for you to retrieve your data from. The data
remains
in the dataset until you call this command again to
retrieve
data from a new query.
DBGetDataByColName -- Returns a string
containing the data in the row
and
column that you specify. This command allows
you
to retrieve the data from the column by name.
DBGetDataByColNum
-- Returns a string containing the data in the row
and
column that you specify. This command allows
you
to retrieve the data from the column by number.
DBError -- Returns a
string with the complete text of the current error. Be
very careful
that you don't call any other DBConn commands before
you
retrieve the error text of the last detected error, or you may end
up
with a secondary error message and miss the first one.
|
|