You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2005/01/12 11:04:10 UTC

Re: DIO help

"Ben L." <bh...@guam.net> writes:

> I can't seem to figure out DIO. Can anyone give me a real world example on
> how to configure to connect to mysql?

The docs don't give you a clear idea?

> Your help is greatly appreciated.

Hi, I'm going to respond to you and put the -dev list in CC, because
the people who know how to use it best are on that list... it's
probably best to use it.

Another option you might consider too is nstcl's database connectivity
code.

-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: DIO help

Posted by "David N. Welton" <da...@dedasys.com>.
"GoMp@tcl.no" <go...@tcl.no> writes:

> Wouldn't a simple solution be to use already full-working and clearly
> documented extensions such as FBSql
> (http://www.fastbase.co.nz/fbsql/index.html) and MyTcl?

Sure, or one of the other methods for connecting directly to a
database.  What nstcl or DIO give you, though, are portability between
databases.  Some people may not care one whit for that, others might
consider it a necessity.

-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: DIO help

Posted by "GoMp@tcl.no" <go...@tcl.no>.
Wouldn't a simple solution be to use already full-working and clearly 
documented extensions such as FBSql 
(http://www.fastbase.co.nz/fbsql/index.html) and MyTcl?

David N. Welton wrote:
> "Ben L." <bh...@guam.net> writes:
> 
> 
>>I can't seem to figure out DIO. Can anyone give me a real world example on
>>how to configure to connect to mysql?
> 
> 
> The docs don't give you a clear idea?
> 
> 
>>Your help is greatly appreciated.
> 
> 
> Hi, I'm going to respond to you and put the -dev list in CC, because
> the people who know how to use it best are on that list... it's
> probably best to use it.
> 
> Another option you might consider too is nstcl's database connectivity
> code.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: DIO help

Posted by Andy Doerr <an...@swbell.net>.
Here is an example.  Hope this helps.

# Begin admin.cfg
#################################################

    package require form
    package require DIO
    package require DIODisplay

    ::DIO::handle Mysql ::request::adminusers \
	-user <your Mysql user name> \
	-pass <your Mysql Password>\
	-db tickets \
	-table AdminUsers \
	-keyfield login \

    ::DIODisplay ::request::$instance \
	-DIO ::request::adminusers \
	-title "Admin Users" \
	-functions {Search Add} \
	-rowfunctions {Details Edit Delete} \
	-rowfields {login name email} \
	
    #BEGIN FIELD CONFIG

    $instance field name \
	-SIZE 40 \

    $instance field email \
	-SIZE 40

    $instance field login \
	-SIZE 40

    $instance field password \
	-SIZE 40 \
	-type password

    #END FIELD CONFIG

    $instance searchfields {name login email}
##############################################
#End of admin.cfg

# Begin admin.rvt
##############################################
set instance page

source admin.cfg

$instance show

##############################################
# end admin.rvt

--- "David N. Welton" <da...@dedasys.com> wrote:

<snip>

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: DIO help

Posted by "David N. Welton" <da...@dedasys.com>.
"Ben L." <bh...@guam.net> writes:

> > The docs don't give you a clear idea?

> Sorry to say I cannot figure it out based on the docs. That's why
> I'm asking for help :).

Sure, that's fine, it would just be helpful to know where the docs
aren't specific enough, or other pointers on how they could be
improved.

> > Another option you might consider too is nstcl's database
> > connectivity code.

> I looked at and got mysqltcl working. But I wanted to get DIO
> working.  From the sound of things it seems that not too many people
> how to get DIO working because ppl are suggesting using an external
> db driver.

DIO is a layer above an external DB driver such as mysqltcl or the
postgresql driver or Oracle, or whatever, so you are still going to
have whatever lower level driver to interact directly with the
database.  DIO just means that you ought to be able to easily swap out
databases without too much hassle.  I don't actually use it much
myself, maybe Damon can comment (does Damon still read this list?
Hello?  You out there?:-)

Speaking of which, I've taken the liberty of CC'ing the list again.
Rivet email should be sent to the Rivet lists, please:-)

Ciao,
-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org