Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-06-2005, 05:38 AM
Junior Member
 
Join Date: Mar 2003
Posts: 13
Default [ADODB's]INSERT INTO can't work well?

var tid=new String(record.RecordCount+1);
var tname="test2";
var tage=2;
var tsex="male";
var tscore=2;
var sql = "insert into student (id,name,age,sex,score) values ('"+tid+"','"+tname+"','"+tage+"','"+tsex+"','"+ts core+"')";
conn.Execute(sql);
trace("sql:"+sql)
//////////the codes above can't insert a record into the student mdb in your official database sample

var sql = "insert into student (id,name,age,sex,score) values ('8','test1','11','male','60')";
conn.Execute(sql);
trace("sql:"+sql)
//////////but these codes above can work well

why??

And how to write codes Recordset.AddNew in FFish?
Thanks!
__________________
- = Vista = -
Reply With Quote
  #2 (permalink)  
Old 10-06-2005, 07:39 AM
Junior Member
 
Join Date: Mar 2003
Posts: 13
Default Re:[ADODB's]INSERT INTO can't work well?

In another word,database's connection is no problem from your official database sample.
But how to insert a record into a mdb?
Can you make a help to me?
__________________
- = Vista = -
Reply With Quote
  #3 (permalink)  
Old 10-07-2005, 01:23 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:[ADODB's]INSERT INTO can't work well?

Please send the files to support@swfkit.com, we will check it for you.
Reply With Quote
  #4 (permalink)  
Old 10-18-2005, 01:40 PM
Junior Member
 
Join Date: Mar 2003
Posts: 13
Default Re:[ADODB's]INSERT INTO can't work well?

how to make a search function in FFish with mdb?
what's wrong with the codes below?they can't work?

var sql = "select * from student where id=" + 5;
tt = conn.Execute(sql);
trace(tt.RecordCount); //trace=-1 why???
for(i=0;i<tt.RecordCount;i++){
trace(tt.Fields(1).Value+"|"+tt.eof);
tt.MoveNext();
if (tt.eof) return;
}
__________________
- = Vista = -
Reply With Quote
  #5 (permalink)  
Old 10-21-2005, 11:19 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:[ADODB's]INSERT INTO can't work well?

Please be careful of the cursor type,

http://msdn.microsoft.com/library/de...cursortype.asp

Some type of cursors do not support the RecordCount feature.
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 01:59 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.