Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2005, 01:44 PM
Junior Member
 
Join Date: Sep 2004
Posts: 8
Default a question!~~~

a question in database, please look at the program, how can i display the sql result?thanks a lot!~~~

db_name = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";
db_name += getAdditionalFile("ip.mdb");
var conn = new ActiveXObject("ADODB.Connection");
isConn = false;
conn.ConnectComplete = function (err, status, cnt)
{
if (typeof err != "undefined")
{
trace(err.Description);

return;
}
else
{
trace("Connect complete!");
isConn = true;
}
}
conn.Open(db_name);

if (!isConn)
{
Dialogs.msgBox("Connect database faild!", "Error", 16);
return;
}

var record = new ActiveXObject("ADODB.Recordset");
record.Open("select * from student", conn, 1, 2);
record.MoveFirst();

function updateForm()
{
start = record.Fields(0).Value.toString();
end = record.Fields(1).Value.toString();
place = record.Fields(2).Value.toString();
}
updateForm();

var sql = "select place from student where place = 'usa'";
var xx = conn.Execute(sql);
trace(xx.RecordCount);// how can i display the sql result?
Reply With Quote
  #2 (permalink)  
Old 11-17-2005, 02:38 PM
Junior Member
 
Join Date: Sep 2004
Posts: 8
Default Re:a question!~~~

;D

不好意思自己搞定了,原来是

var xxx = conn.Execute(sql);
trace(xxx.Fields["start"].Value.toString())
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 02:04 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.