|
|||
|
Wots wrong with this code? I am looking into this for last 2 hours.. but found nothing working! could you please tell me?
Code:
// SWFKit Improrts
import SWFKit.*;
// Global Variables
var conn = new ActiveXObject("ADODB.connection");
// SWFKit Functions
conn.connectComplete = function(err, status, cnt) {
if (typeof err != "undefined") {
trace2(err.Description);
return;
} else {
trace2("connect complete!");
conn.connectOK = true;
}
trace2("status: "+status.value);
};
// Flash Functions
function markhandler(evt_obj:Object):Void {
// Change Accordion view depending on button selected.
// Call Attendence Mark
}
//var DAS = getAppDir() + "\\DAS.mdb"; // Not working...
var DAS = "C:\\DAS\\DAS.mdb";
function connectDatabase() {
var connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DAS;
_root.conn.connectOK = false;
trace2(connStr);
conn.open(connStr);
}
connectDatabase();
if (!conn.connectOK) {
trace2("Failed to connect to the DB");
}
var record = new ActiveXObject("ADODB.Recordset");
record.Open("select * From Users", conn, 1, 2);
// Add Listeners for the buttons.
MarkAttendence.addEventListener("click", markhandler);
function trace2(content) {
Dialogs.msgBox(content);
}
__________________
SWFBaz Preview [October 2006] http://www.SWFBaz.com |
|
|||
|
actually MDAC 2.5 or later was not installed on the machine which i was compiling the application... i had the same problem by using Zinc.
Now i have found it working... thanx for your help. I was not intended to work with ADODB as it could be done using simple activex. Regards
__________________
SWFBaz Preview [October 2006] http://www.SWFBaz.com |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|