This block of code and it's associated UDFs works great for writing the "testcomputer" entry into my "test" mysql DB:
Code:
$ConnDSN = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;USER=test;PASSWORD='';OPTION=3;"
$objConn = DBConnOpen($ConnDSN)
? "Error @ERROR: @SERROR"
sleep 2
$sql = "INSERT INTO computer(name) VALUES('testcomputer')"
DBExecuteSQL($objConn,$sql)
? "Error @ERROR: @SERROR"
sleep 2
DBConnClose($objConn)
? "Error @ERROR: @SERROR"
sleep 2
but when i add the EXACT same code (copy/paste) into another kix file, it gives me an undefined variable reference to $ConnDSN??? The purpose of this experiment was to try and get some of NTDOC's COMPINFO.KIX file to write some of the variables collected into a db. When that failed, I went back to my test.kix file (code above), it ran fine so I copied and pasted that exact code WITH UDFs to COMPINFO.KIX in place of the HTML generation and it gives me those undeclared variables error. Can anyone shed any light on this for me?
Edited by thepip3r (2005-04-14 08:08 PM)