以下代码不能连续测试距离?就是数据库有很多点坐标,算当前坐标和前一坐标的距离,下面代码怎么改呢?谢
DataViewdvPostion=newDataView(dt);dvPostion.RowFilter="point='"+strPoint+"'";XYValues...
DataView dvPostion = new DataView(dt);
dvPostion.RowFilter = "point = '" + strPoint + "'";
XYValues values = new XYValues();
values.x = int.Parse(dvPostion[0]["X"].ToString());
values.y = int.Parse(dvPostion[0]["Y"].ToString());
return values; 展开
dvPostion.RowFilter = "point = '" + strPoint + "'";
XYValues values = new XYValues();
values.x = int.Parse(dvPostion[0]["X"].ToString());
values.y = int.Parse(dvPostion[0]["Y"].ToString());
return values; 展开
1个回答
展开全部
链接数据库的语句?
define("HOST", "localhost");
define("USER", "数据库用户名");
define("PASSWORD", "数据库密码");
define("DATABASE", "数据库表");
$db=mysql_connect(HOST, USER, PASSWORD) or die ("mysql connected failed");
mysql_select_db(DATABASE, $db);
或
$DBHOST="localhost";
$DBUSER="用户名";
$DBPWD="密码";
$DBNAME="表名";
然后在页面中打开查询...
噢,对了.localhost是指本地.如果是远程的话.就得用ip
define("HOST", "localhost");
define("USER", "数据库用户名");
define("PASSWORD", "数据库密码");
define("DATABASE", "数据库表");
$db=mysql_connect(HOST, USER, PASSWORD) or die ("mysql connected failed");
mysql_select_db(DATABASE, $db);
或
$DBHOST="localhost";
$DBUSER="用户名";
$DBPWD="密码";
$DBNAME="表名";
然后在页面中打开查询...
噢,对了.localhost是指本地.如果是远程的话.就得用ip
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询