This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

read from a access database

Old posts that have not been replied to for several years.
Locked
b
blarre
Voice
Posts: 15
Joined: Sun Apr 28, 2002 8:00 pm

read from a access database

Post by blarre »

hi, i wonder if its possible to take information from a MS access database...

if i have a database whit name asobiba

and a table whit name members

how can i then take information from members?

then if a person write !find name then the scripts search in the database after the word i write...

thanks
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

well, I've never done it before (been a while since I was really involved with windows), but I think you have set up an odbc data source using the access database and then compile an odbc module for tcl. Then you should be able to access the data. Good luck.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

possibly an easier way would be to write a dde module and run the eggdrop on a windows box. it does have the downside of meaning that you'll have to have access running, but on the plus side it means that eggdrop would have direct access to most of access's features.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The DDE Tcl module is rather flaky.

I used the DDE module to return information to mIRC, when processing complex scripts (that mIRC could not handle). I now use a DLL to call the script, and use the STDOUT + STDERR information to view returned data.

I found it would crash the oposite DDE party, rather than itself.

No, this was not a issue with mIRC, or any other DDE aware software. mIRC DDE interfaces with IE/netscape allmost all the time (to gain information on the currently viewed web-page).

I also have a few VB programs that interface with mIRC using DDE, without issue.

A ODBC module would do better.

Another option would be to create a exit macro in access (or module), that would export a CVS version of the table. This can be easily read by plain Tcl.

A import macro could do the same thing for startup.
b
blarre
Voice
Posts: 15
Joined: Sun Apr 28, 2002 8:00 pm

Post by blarre »

thanks for the help, now i have installed mySQl on the linux machine...

but now i think i need some expert help :)

how do i write the script??

i have some command to use like

-host hostname
-user user
-password password


anyone whant to help me??
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

After downloading and installing the MySQL server, you will have to setup the DB and tables.

This is all trivial, and unrelated to the Tcl.

However, to get Tcl to comunicate with the MySQL server, there are a few more steps to take.

First, you will need to download a package or addon module for Tcl, that can be used to talk with the MySQL server.

Look at the MySQL site for information on these.

Once downloaded and compiled, you should read the instructions that come with the package, as these will provie you with all the commands required.
b
blarre
Voice
Posts: 15
Joined: Sun Apr 28, 2002 8:00 pm

Post by blarre »

ok, thanks thene...
trying to do the script :P
Locked