PinkeyNBrain
IS-IT--Management
The goal is to read MS Access tables. I have some code that has worked, but I can't get it to work consistently. Looking to find out what I'm missing:
Surfing, I found this code:
I did little more than cut-n-paste it into an active coding session and it worked. Reboot PC, wouldn't work 2nd time
Any ideas?
HDWR: 64-bit HP laptop
SFWR: Win7, tclversion=8.4, MS2010-64bit version
I've heard feedback about MS2010-64bit being quirky, will be looking to find a 32-bit version to test the code against later today. The fact that I did get this to work several times keeps making me think I'm missing something.
Surfing, I found this code:
Code:
package require dde
set request "$mdbfile;TABLE $table"
set it [dde request MSAccess $request All]
foreach line [split $it \n] {
puts [string map {\t ;} $line]
}
I mess around, ensure proper file path "if file exists xxx", use console to cd into same directory, cut-n-paste table name to verify spelling, all the usual alpha-coding level testing stuff. After 10 minutes of messing around, it'll work. Reboot - back to same error. Found DDE2.0 package (was using 1.2.2), loaded it, new error but still not working.error said:dde command failed"
Tried to search DDE2.0 source code for error string to help determine root cause - nothing.error said:Invalid connection Id for "request" function!
Any ideas?
HDWR: 64-bit HP laptop
SFWR: Win7, tclversion=8.4, MS2010-64bit version
I've heard feedback about MS2010-64bit being quirky, will be looking to find a 32-bit version to test the code against later today. The fact that I did get this to work several times keeps making me think I'm missing something.