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等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/RAR.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 103 条
- 1
- 2
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/6ba19994c6c3461f8cf75ff80f635020_qq_34910341.jpg!1)
CyMylive.
- 粉丝: 7284
- 资源: 4万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)