slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
多媒體學習活動 PowerPoint Presentation
Download Presentation
多媒體學習活動

Loading in 2 Seconds...

play fullscreen
1 / 17

多媒體學習活動 - PowerPoint PPT Presentation


  • 144 Views
  • Uploaded on

多媒體學習活動. 組員: 洪崇富 ( 報告 ) 楊景宇 鄭豈銜 陳君儀. 評分系統. ODBC (Open Database Connectivity) Database. Odbc & Database. 先安裝 Odbc 元件 連接資料庫的元件: <Ⅰ> 讀入資料庫的位置 string workdir = Directory.GetCurrentDirectory(); string srcDB = workdir+ "\\STU.mdb" ;. Odbc & Database. <Ⅱ> 連接資料庫需要的指令資訊

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '多媒體學習活動' - harva


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

多媒體學習活動

組員:

洪崇富(報告)

楊景宇

鄭豈銜

陳君儀

slide2
評分系統
  • ODBC

(Open Database Connectivity)

  • Database
odbc database
Odbc & Database
  • 先安裝Odbc元件
  • 連接資料庫的元件:

<Ⅰ>讀入資料庫的位置

string workdir = Directory.GetCurrentDirectory();

string srcDB = workdir+"\\STU.mdb";

odbc database1
Odbc & Database

<Ⅱ>連接資料庫需要的指令資訊

string connsp = "Driver={Microsoft Access Driver(*.mdb)};DBQ="+srcDB+";UID=;PWD=";

<Ⅲ>產生連接資料庫的元件

conn = new OdbcConnection();

odbc database2
Odbc & Database

<Ⅳ>設定連接所需的資訊

conn.ConnectionString = connsp;

<Ⅴ>設定連接後的指令物件

comm = conn.CreateCommand();

database
Database

程式段:

string name = selectnd.Text ;

comm.CommandText = "SELECT * FROM "+table+" where Name = '"+name+"' ";

comm.Connection = conn;

conn.Open();

slide7

選擇班級

從資料庫中讀取該班級的資料

slide11
評分系統程式

while(reader.Read()) //reader利用Read() method將資料一筆一 //筆的讀進來,讀到完為止

{

string stufile = "files\\students\\" + clsCB.Text +"\\"+reader.GetInt32(3).ToString()+".wmv";

Console.WriteLine(stufile);

if(File.Exists(stufile))

{

stunode = new TreeNode(reader.GetString(2),0,2);

viewTV.Nodes.Add(stunode);

}

slide12
評分系統程式

else

{

stunode = new TreeNode(reader.GetString(2),1,2);

viewTV.Nodes.Add(stunode);

}

}

saveBtn.Enabled = false; //一開始設為false,即一開始不用存檔

reader.Close(); //關閉reader和database的連接

conn.Close(); //關閉連線元件conn和資料庫的連接

slide13
評分系統程式

classTB.Text = reader.GetInt32(0).ToString();

noTB.Text = reader.GetString(1);

currentNo = noTB.Text;

nameTB.Text = reader.GetString(2);

stunoTB.Text = reader.GetInt32(3).ToString();

if (reader.GetString(4).Equals("男"))

boyRB.Select();

else

girlRB.Select();

slide14
評分系統程式

private void allcompClear()

{

classTB.Clear();

nameTB.Clear();

noTB.Clear();

stunoTB.Clear();

boyRB.Checked = (girlRB.Checked = false);

playBtn.Enabled = false;

slide15
評分系統程式

CBitems = new int[5];

for(int g=0;g<5;g++)

{

if (chosen[g] != null)

{

chosen[g].Checked = false;

chosen[g] = null;}

}

scoreTB.Text = "60";

}

slide16
遭遇困難
  • 程式缺乏完整,吸收上較為困難
  • 程式結構不完善,缺乏組織
slide17
未來進度
  • 以現有的資料做延伸
  • 將所有報告整合