package com.bn.helper;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.widget.EditText;
public class DBUtil
{
static SQLiteDatabase sld;
static EditText et;
public static void createOrOpenDatabase() throws Exception
{
sld=SQLiteDatabase.openDatabase
(
"/data/data/com.bn.helper/sd.dbdb", //数据库所在路径
null, //CursorFactory
SQLiteDatabase.OPEN_READWRITE|SQLiteDatabase.CREATE_IF_NECESSARY //读写、若不存在则创建
);
String sql1="create table if not exists lines(L_number INTEGER(5),L_name varchar2(20),L_description varchar2(100))";
sld.execSQL(sql1);
String sql2="create table if not exists station(S_number INTEGER(5),S_name varchar(20),S_description varchar2(40),S_jd varchar2(20),S_wd varchar2(20))";
sld.execSQL(sql2);
String sql3="create table if not exists ls(XZ_id INTEGER(5),L_number INTEGER(5),S_number INTEGER(5),num INTEGER(3))";
sld.execSQL(sql3);
String sql4="create table if not exists linerevise(id INTEGER(5),num INTEGER(3),XZ_ID INTEGER(5),jd varchar2(20),wd varchar2(20))";
sld.execSQL(sql4);
String sql5="create table if not exists temp(num INTEGER(3),jd varchar2(20),wd varchar2(20))";
sld.execSQL(sql5);
String sql6="create table if not exists tranfrostop(id INTEGER(5),name varchar2(20),jd varchar2(20),wd varchar2(20),L_name varchar2(20))";
sld.execSQL(sql6);
}
public static void closeDatabase() throws Exception
{
sld.close();
}
//插入记录的方法
public static void insert()throws Exception
{
String[] sqlsb={
"insert into lines values(00002,'地铁2号线','')",
"insert into lines values(00001,'地铁1号线','')",
"insert into lines values(00013,'地铁13号线','')",
};
for(String sql:sqlsb)
{
sld.execSQL(sql);
}
String[] sqlsc={
"insert into station values(00001,'西直门站','','116.3551452636719','39.940277770390324')",
"insert into station values(00002,'车公庄站','','116.35594367980957','39.93191969562437')",
"insert into station values(00003,'阜成门站','','116.35637283325195','39.92290236029078')",
"insert into station values(00004,'长椿街站','','116.36332511901855','39.89910274087739')",
"insert into station values(00005,'宣武门站','','116.37439727783203','39.899497822790494')",
"insert into station values(00006,'和平门站','','116.38426780700683','39.89989290242579')",
"insert into station values(00007,'前门站','','116.39800071716308','39.89992582562591')",
"insert into station values(00008,'崇文门站','','116.4175271987915','39.900847668807245')",
"insert into station values(00009,'北京站','','116.42718315124512','39.90486412650293')",
"insert into station values(00010,'朝阳门站','','116.43469333648681','39.924350479594196')",
"insert into station values(00011,'东四十条站','','116.43435001373291','39.93343343839839')",
"insert into station values(00012,'东直门站','','116.43374919891357','39.941001650090925')",
"insert into station values(00013,'雍和宫站','','116.41705513000488','39.94909541971909')",
"insert into station values(00014,'鼓楼大街站','','116.39370918273926','39.94876642336431')",
"insert into station values(00015,'积水潭站','','116.37332439422607','39.94856902479194')",
"insert into station values(00016,'苹果园站','','116.1779308319098','39.92645678026888')",
"insert into station values(00017,'古城站','','116.19080543518066','39.907330022383197')",
"insert into station values(00018,'八宝山革命公墓站','','116.23582363128662','39.90730022383197')",
"insert into station values(00019,'玉泉路站','','116.25316143035888','39.90726730417519')",
"insert into station values(00020,'五棵松站','','116.27423286437988','39.907201464814136')",
"insert into station values(00021,'木樨地站','','116.33796215057373','39.907168545109904')",
"insert into station values(00022,'南礼士路站','','116.35268211364746','39.9070368661347')",
"insert into station values(00023,'复兴门站','','116.35667324066162','39.90713562538983')",
"insert into station values(00024,'西单站','','116.37439727783203','39.907201464814136')",
"insert into station values(00025,'天安门西站','','116.39182090759271','39.90733314347294')",
"insert into station values(00026,'天安门东站','','116.4016056060791','39.907596500031254')",
"insert into station values(00027,'王府井站','','116.4116907119751','39.90792569430544')",
"insert into station values(00028,'东单站','','116.42014503479004','39.908123210110666')",
"insert into station values(00029,'建国门站','','116.43593788146972','39.90845240185384')",
"insert into station values(00030,'永安门站','','116.45057201385498','39.908254886997746')",
"insert into station values(00031,'大望路站','','116.47679328918457','39.908024452279236')",
"insert into station values(00032,'四惠路站','','116.49906635284424','39.908419482750716')",
"insert into station values(00033,'四惠东站','','116.51618977519531','39.90832072534639')",
"insert into station values(00034,'高碑店站','','116.5325403213501','39.9091107805945')",
"insert into station values(00035,'双桥站','','116.57721519470215','39.9101312551376')",
"insert into station values(00036,'管庄站','','116.5995740890503','39.90897910535256')",
"insert into station values(00037,'八里桥站','','116.61828517913818','39.905687142046275')",
"insert into station values(00038,'通州北苑站','','116.63738250732422','39.903481438133426')",
"insert into station values(00039,'果园站','','116.64656639099121','39.893209165276026')",
"insert into station values(00040,'九棵树站','','116.65763854980469','39.89001522821706')",
"insert into station values(00041,'梨园站','','116.66853904724121','39.88359397660328')",
"insert into station values(00042,'临河里站','','116.6788387298584','39.87522898285956')",
"insert into station values(00043,'土桥站','','116.68664932250976','39.87177071491688')",
"insert into station values(00044,'西直门站','','116.3551452636719','39.940277770390324')",
"insert into station values(00045,'大钟寺站','','116.34512901306152','39.96652996217967')",
"insert into station values(00046,'知春路站','','116.34000062942505','39.97642948739513')",
"insert into station values(00047,'清华园站','','116.33914232254028','39.98261185212121')",
"insert into station values(00048,'五道口站','','116.33761882781982','39.99285427306812')",
"insert into station values(00049,'上地站','','116.32000207901001','40.03293783519874')",
"insert into station values(00050,'清河站','','116.31500244140625','40.041184995048646')",
"insert into station values(00051,'龙泽站','','116.31963729858398','40.07069902257262')",
"insert into station values(00052,'回龙观站','','116.33648157119751','40.07046913520271')",
"insert into station values(00053,'霍营站','','116.36128664016723','40.07056765845624')",
"insert into station values(00054,'北苑站','','116.43465042114258','40.04294272685822')",
"insert into station values(00055,'望京西站','','116.44604444503784','39.992788516034295')",
"insert into station values(00056,'芍药居站','','116.4361310005188','39.977843588238784')",
"insert into station values(00057,'光熙门站','','116.43190383911133','39.96825672678314')",
"insert into station values(00058,'柳芳站','','116.43267631530762','39.958191542192644')",
"insert into station values(00059,'东直门站','','116.43374919891357','39.941001650090925')",
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
基于Android的北京地铁小助手有导航功能.zip (103个子文件)
resources.ap_ 437KB
TrainSystemHelper.apk 472KB
DBUtil.class 24KB
MapNavigateActivity.class 9KB
TrainSystemHelperActivity.class 9KB
TrainSystemHelperActivity$5.class 6KB
MyBallonOverlay.class 6KB
TrainOverlay.class 5KB
MyNavigateOverlay.class 5KB
MyMapOverlay.class 4KB
StationPicture.class 4KB
NavigateUtil.class 3KB
MapNavigateActivity$5$1.class 3KB
MapNavigateActivity$5.class 3KB
MySurfaceView.class 2KB
MapNavigateActivity$4.class 2KB
MySurfaceView$1.class 2KB
GGView.class 2KB
MapNavigateActivity$4$1.class 2KB
TrainSystemHelperActivity$13.class 2KB
MiddleTrainOverl.class 2KB
TrainSystemHelperActivity$9.class 2KB
TrainSystemHelperActivity$11.class 2KB
TrainSystemHelperActivity$12.class 2KB
TrainSystemHelperActivity$5$1.class 2KB
TrainSystemHelperActivity$10.class 2KB
TrainSystemHelperActivity$8.class 2KB
MapNavigateActivity$3.class 1KB
R$drawable.class 1KB
MapNavigateActivity$1$1.class 1KB
MapNavigateActivity$2.class 1KB
TrainSystemHelperActivity$6.class 1KB
TrainSystemHelperActivity$7.class 1KB
MapNavigateActivity$1.class 1001B
GGView$1.class 954B
TrainSystemHelperActivity$3.class 868B
TrainSystemHelperActivity$2.class 868B
TrainSystemHelperActivity$4.class 868B
TrainSystemHelperActivity$1.class 838B
R$id.class 807B
Constant.class 605B
Address.class 561B
R.class 496B
R$string.class 412B
R$layout.class 406B
R$attr.class 325B
NothingOverlay.class 310B
.classpath 280B
classes.dex 71KB
DBUtil.java 24KB
MapNavigateActivity.java 19KB
TrainSystemHelperActivity.java 18KB
MyBallonOverlay.java 5KB
MyMapOverlay.java 5KB
TrainOverlay.java 5KB
StationPicture.java 5KB
MyNavigateOverlay.java 4KB
R.java 3KB
MySurfaceView.java 3KB
NavigateUtil.java 3KB
GGView.java 2KB
MiddleTrainOverl.java 1KB
Constant.java 513B
Address.java 348B
NothingOverlay.java 131B
adv2.jpg 89KB
adv3.jpg 84KB
adv4.jpg 77KB
adv1.jpg 75KB
title.jpg 916B
dukea.png 39KB
dukeb.png 21KB
daohang.png 12KB
icon.png 5KB
xianlu.png 5KB
two.png 4KB
three.png 4KB
next.png 4KB
history.png 4KB
biaodu.png 4KB
tubiao.png 3KB
xiaotubiao.png 3KB
start.png 2KB
end.png 2KB
car1.png 2KB
ballon.png 2KB
cart.png 2KB
car.png 2KB
people.png 1KB
carl.png 1KB
arraw.png 966B
dialog.9.png 966B
next_g.png 823B
navigator.png 796B
hilight.png 324B
.project 853B
default.properties 380B
TrainSystemHelper.rar 1.28MB
main.xml 11KB
map.xml 2KB
共 103 条
- 1
- 2
资源评论
CrMylive.
- 粉丝: 1w+
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- nuScenes-map-expansion-v1.3.zip
- 基于web的二手闲置交易系统源码(java毕业设计完整源码).zip
- 计算机专业学习-教程和学习方法
- 基于javaweb的淘狗管理系统.doc
- Sgmediation命令安装Stata命令中介效应Sobel检验附图文安装教程
- 基于web的助农商超网站的设计与实现源码(java毕业设计完整源码).zip
- 基于web的图书馆联盟信息采集系统.doc
- stm32数控buck同步整流电路 效率可达95%以上 电压电流采样 反馈电路采用软件增量式pi闭环控制,可以实现恒压闭环 驱动电路采用ir2104芯片驱动半桥 输出采样电路通过lm385进行放大反馈
- 基于web的医疗设备管理系统源码(java毕业设计完整源码).zip
- 基于web的图书馆预约管理系统.doc
- sqlyog 13.1.9 Trail (ultimate) pj版本
- python exe pyinstaller 适配 win7 onnx
- 打架图像分类数据集4类别:打、踢、推、拳击(28000张图片).rar
- 物流规划自动化立体仓库的规划与评估
- 基于Java技术的图书馆占座系统的设计与实现
- 基于Web的医院挂号预约管理系统的设计与实现源码(java毕业设计完整源码).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功