From: Kevin K. <kk...@ny...> - 2009-02-11 01:24:59
|
Patrick Dunnigan wrote: > Here's the background: > > I have an enterprise-grade software solution that has been in production use > for 6+ years, the most important component of which is written in TCL / > Expect. > > We've been using various methods to connect to databases over the years, > from ODBC bridges to TCLtoDBI Perl to our own connectivity library to > connect to SQL Server / Sybase (through freeTDS), Oracle OCI, SQLite, MySQL > etc. Kind of a home grown ODBC without needing Unix ODBC. Works very well > and is very fast. > > Well we need to port to Windows and I would like to explore the possibility > of not using the home grown connectivity library. I can use TclODBC for the > SQL Server piece but it doesn't look like it's in active development and I'd > like to make sure we stay with something active. TDBC is now popping up so > I'd like to see if it fits the needs. Exciting. I want to help. > I downloaded ActiveState 8.6b1. Tested TclODBC connectivity to SQL Server > 2005 Enterprise, works fine. Half the battle. If ODBC is going, tdbc::odbc will work fine. > I then moved onto tdbc, tried passing in a connection string with no > success. I then realized that I didn't have enough information on the > command syntax. I looked for man pages, etc. etc. and didn't locate them. Yes, I see that the Webification of the man pages is not happening, and I'm not sure why, but I'll track it down. > I then downloaded the zip file referenced by the link below, ran the install > and had errors at every step, couldn't create directories, etc. I edited the > install script and removed the -force on the file mkdir commands, still had > errors so I decided to go for help. > > The line I decided to stop on was: file mkdir [file join $::tcl_library > tcl8/8.6/tdbc]. I didn't have confidence that this was the proper path. > The path it would create in my case would be: > > C:\Tcl\lib\tcl8.6\tcl8\8.6\tdbc Ouch, that's not right; looks as if I've got a regression in the installer. Let me check it out and get back to you. > 1. is this the most recent and accurate install script? Recent, yes. Accurate, obviously not. Let me get it fixed and get back to you. > 2. How would I pass a SQL Server ODBC connection string to the tdbc > connection command? tdbc::odbc::connection create db $connectionString and 'db' becomes a TDBC connection handle. Replace 'db' with whatever command name you'd like it to have. > 3. You mentioned man pages are there, but I don't see them in the Active > State 8.6b1 install or on the web. Can you point me to them? I don't see them on www.tcl.tk, either - let me get with Jeff and Andreas and see if they can track down the reason they're not showing up. I'll put HTML ones up for you and post back here again. -- 73 de ke9tv/2, Kevin |