Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2006, 08:35 AM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Databse Connectivity - Doest not work!

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
Reply With Quote
  #2 (permalink)  
Old 09-01-2006, 02:45 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Databse Connectivity - Doest not work!

You would have to also import the ADODB wrapper classes created by the "WrapperCreator" tool.
Reply With Quote
  #3 (permalink)  
Old 09-05-2006, 09:40 AM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Re:Databse Connectivity - Doest not work!

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
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:52 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.