1.資料庫的查詢
query1->close();
query1->sql->clear();
query1->sql->add("select soft_name,soft_vision,soft_org from soft_info where ");
query1->sql->add("host_ip='192.168.1.111'");
query1->execsql();
//上面是將結果集儲存在query1中
int q=query1->recordcount;
if(query1->findfirst()) //查詢結果集中的第一條記錄
m++;}}
//上面是將每條記錄存到控制項中
2.資料庫的新增
query1->close();
query1->sql->clear();
query1->sql->add("insert into soft_info (soft_name,soft_vision,soft_org,host_ip) values ('");
query1->sql->add(name->operator (j)+"','");
query1->sql->add(version->operator (j)+"','");
query1->sql->add(pub->operator (j)+"','");
query1->sql->add("109.128.10."+ansistring(j+1)+"')");
query1->execsql();
3.資料庫的刪除
query1->close();
query1->sql->clear();
query1->sql->add("delete from soft_info");
query1->execsql();
query1->datasource->dataset->refresh();
資料庫連線大全
ole db,oledbconnection sqlconnection data shape read more access ole db,oledbconnection oracle ole db,oledbconnection oracleconnection core labs oradi...
JDBC資料庫連線大全
1 oracle8 8i 9i資料庫 thin模式 class.forname oracle.jdbc.driver.oracledriver newinstance string url jdbc oracle thin localhost 1521 orcl orcl為資料庫的sid strin...
連線資料庫大全
oracle8 8i 9i資料庫 用thin模式 testoracle.jsp如下 class.forname oracle.jdbc.driver.oracledriver newinstance string url jdbc oracle thin localhost 1521 orcl or...