George,
On Nov 2, 11:46 am, Georgios Petasis <
peta...@iit.demokritos.gr>
wrote:
Thank you for the suggestion. I tried the above but it gave an error
that tdbc::mysql::connection wasn't an object.
I then had a look at what package require tdbc::mysql did, and found
that it sources a file before doing the load, so I tried that first
and got a different error, that the interpreter couldn't find
libmysql.dll. I searched around on my hard drive and managed to track
down a copy but then spent half an hour adding that directory to
TCLLIBPATH which doesn't work.
At this point I twigged that it was Windows trying to load the file,
not Tcl and added the directory containing libmsql.dll to PATH. That
worked.
For the benefit of posterity, the required sequence of Tcl instuctions
was
(My Documents) 49 % package ifneeded tdbc::mysql [package versions
tdbc::mysql]
source c:/tcl86/lib/teapot/package/win32-ix86/lib/tdbc_mysql1.0b15/
tdbcmysql.tcl; load c:/tcl86/lib/teapot/package/win32-ix86/lib/
tdbc_mysql1.0b15/tdbcmysql10b15.dll tdbcmysql
(My Documents) 50 % package require tdbc
1.0b16
(My Documents) 51 % source c:/tcl86/lib/teapot/package/win32-ix86/lib/
tdbc_mysql1.0b15/tdbcmysql.tcl
::tdbc::mysql::resultset
(My Documents) 52 % load [file nativename c:/tcl86/lib/teapot/package/
win32-ix86/lib/tdbc_mysql1.0b15/tdbcmysql10b15.dll] tdbcmysql
Your mileage WILL vary according to how and where you've installed
Tcl.
Many thanks George for pointing me in the right drection. I've located
and modified the relevant pkgIndex.tcl so it all works automatically
and beautifully.
A couple of followups to someone from AS:
i) Any chance of getting the [file nativename ...] added to
pkgIndex.tcl in the distribution?
ii) What about libmysql.dll? Shouldn't that be part of the
distribution, or would that cause licensing problems?
Thanks again George
--
Alan