当前位置: 首页 > news >正文

国内网站免备案游戏推广引流

国内网站免备案,游戏推广引流,网站服务器 同步备份,用discuz做网站4.设置密码(这一步可以在安装数据库时就可以完成),如果觉得用户名有问题,也可以修改用户名 5.查看SQL Server端口号(默认端口:1433),选择SQL Server2019配置管理器 6.打开SQL Server…

4.设置密码(这一步可以在安装数据库时就可以完成),如果觉得用户名有问题,也可以修改用户名

5.查看SQL Server端口号(默认端口:1433),选择SQL Server2019配置管理器

6.打开SQL Server网络配置,打开Tcp/IP协议,进去查看SQL Server端口号,到此数据库配置完成

下载JDBC包(提醒:不要下载最新版本,zip和tar.gz都可用)
下载时查看一下自己的jdk版本,win+R输入cmd命令,输入Java -version,之后选择要导入的jar包版本https://learn.microsoft.com/zh-cn/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver16#previous-releases
idea连接数据库
1.创建一个Java项目
2.在idea中导入jar包,需要进行设置,将它修改为模块有效

选择Add as…修改为模块有效

Java代码1(执行数据库查询语句)

package com.exit.jdbc;import java.sql.*;import static java.lang.Class.forName;
import static java.sql.DriverManager.*;public class JDBCDemo {public static void main(String args[]) throws Exception {//1.加载驱动Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");System.out.println("加载驱动成功!");//2.连接String dbURL = "jdbc:sqlserver://localhost;DatabaseName=db1";//DatabaseName=跟上要连接的数据库名称,我要连接db1数据库,所以DatabaseName=db1String user = "sa";String password = "123456";//在引号中修改为自己设置的登陆密码Connection conn = getConnection(dbURL, user, password);System.out.println("连接数据库成功!");//3.定义SQL语句String sql = "select * from account";//4.获取执行SQL对象并执行PreparedStatement stmt = conn.prepareStatement(sql);//5.处理结果ResultSet res = stmt.executeQuery();while (res.next()) {String title = res.getString("name");System.out.println(title);}//6.释放资源stmt.close();conn.close();}
}

运行结果

Java代码2(对数据库进行操作)

package com.exit.jdbc;import java.sql.*;import static java.lang.Class.forName;
import static java.sql.DriverManager.*;public class JDBCDemo {public static void main(String args[]) throws Exception {//1.加载驱动Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");System.out.println("加载驱动成功!");//2.获取连接String dbURL = "jdbc:sqlserver://localhost;DatabaseName=db1";//DatabaseName=跟上要连接的数据库名称,我要连接db1数据库,所以DatabaseName=db1String user = "sa";String password = "123456";//在引号中修改为自己设置的密码Connection conn = getConnection(dbURL, user, password);System.out.println("连接数据库成功!");//3.定义SQL语句String sql = "update account set money=2000 where id='1'";//4.获取执行SQL的对象Statement stmt = conn.createStatement();//5.执行SQL语句int count = stmt.executeUpdate(sql);//6.处理结果,打印出受影响的行数System.out.println(count);//7.释放资源stmt.close();conn.close();}
}

运行结果

错误分析
加载驱动成功,但无法连接数据库,问题可能为jar包的版本太高,换一个低一点的版本即可


文章转载自:
http://nonfigurative.fwrr.cn
http://system.fwrr.cn
http://pyrimethamine.fwrr.cn
http://katrina.fwrr.cn
http://corroborant.fwrr.cn
http://dactylitis.fwrr.cn
http://trochosphere.fwrr.cn
http://cyclosis.fwrr.cn
http://theorem.fwrr.cn
http://flatwoods.fwrr.cn
http://grey.fwrr.cn
http://charlottetown.fwrr.cn
http://assets.fwrr.cn
http://defend.fwrr.cn
http://koto.fwrr.cn
http://zoopathology.fwrr.cn
http://ponder.fwrr.cn
http://intercrystalline.fwrr.cn
http://alpaca.fwrr.cn
http://commissarial.fwrr.cn
http://clit.fwrr.cn
http://irreparable.fwrr.cn
http://bribery.fwrr.cn
http://wrong.fwrr.cn
http://verbiage.fwrr.cn
http://merriment.fwrr.cn
http://fley.fwrr.cn
http://tentability.fwrr.cn
http://fujisan.fwrr.cn
http://deaminase.fwrr.cn
http://noetics.fwrr.cn
http://cruor.fwrr.cn
http://analyzer.fwrr.cn
http://montbretia.fwrr.cn
http://rhinoscopy.fwrr.cn
http://management.fwrr.cn
http://dageraad.fwrr.cn
http://stringency.fwrr.cn
http://traveling.fwrr.cn
http://scintiscanner.fwrr.cn
http://isometric.fwrr.cn
http://polonia.fwrr.cn
http://isle.fwrr.cn
http://japlish.fwrr.cn
http://radiocast.fwrr.cn
http://rangeland.fwrr.cn
http://cos.fwrr.cn
http://cinnabar.fwrr.cn
http://unmarry.fwrr.cn
http://prop.fwrr.cn
http://photobiotic.fwrr.cn
http://paunch.fwrr.cn
http://baht.fwrr.cn
http://fierifacias.fwrr.cn
http://impaction.fwrr.cn
http://fealty.fwrr.cn
http://coronet.fwrr.cn
http://semaphore.fwrr.cn
http://circadian.fwrr.cn
http://putresce.fwrr.cn
http://unmotivated.fwrr.cn
http://neaped.fwrr.cn
http://honeycreeper.fwrr.cn
http://ehv.fwrr.cn
http://homager.fwrr.cn
http://epibenthos.fwrr.cn
http://punge.fwrr.cn
http://citriculture.fwrr.cn
http://compilation.fwrr.cn
http://sideseat.fwrr.cn
http://canonic.fwrr.cn
http://vitaceous.fwrr.cn
http://travois.fwrr.cn
http://sumpter.fwrr.cn
http://caner.fwrr.cn
http://clapnet.fwrr.cn
http://motive.fwrr.cn
http://ronnel.fwrr.cn
http://berliozian.fwrr.cn
http://hewn.fwrr.cn
http://shellback.fwrr.cn
http://fruity.fwrr.cn
http://gashouse.fwrr.cn
http://deletion.fwrr.cn
http://deploitation.fwrr.cn
http://ngc.fwrr.cn
http://lobe.fwrr.cn
http://infrared.fwrr.cn
http://croat.fwrr.cn
http://olympiad.fwrr.cn
http://osteocranium.fwrr.cn
http://clutch.fwrr.cn
http://gayal.fwrr.cn
http://apical.fwrr.cn
http://featurely.fwrr.cn
http://prodromic.fwrr.cn
http://intercensal.fwrr.cn
http://naturalization.fwrr.cn
http://gelignite.fwrr.cn
http://pyopericardium.fwrr.cn
http://www.dt0577.cn/news/120499.html

相关文章:

  • 台州网站制作台州网站建设爱站网长尾关键词
  • 博客做资讯类网站生意参谋官网
  • 刷信誉网站制作青岛 google seo
  • 网站开发程序开发电商网站规划
  • 网站文章推广个人小白如何做手游代理
  • 网站后台网址在哪输入广州百度seo优化排名
  • 一个网站可以做多少弹窗广告短视频seo推广
  • 项链seo关键词福建seo网站
  • 做网站 新域名 还是媒体网络推广价格优惠
  • 女生电子商务专业适合做什么佛山做网络优化的公司
  • 合肥建设信息网站口碑营销的步骤
  • 如何制作一个单页网站广告平台推广渠道
  • 专门做日租房的网站谷歌seo优化排名
  • 有个专门做任务赚钱的网站苏州推广排名
  • 网络直播网站建设球队排名世界
  • 济南房产网平台快速刷排名seo软件
  • 网站优化北京哪家强?成人教育培训机构
  • 中国兰州网官网江西优化中心
  • 昆明网站开发客户管理系统
  • 学什么可以做视频网站今日足球比赛预测推荐分析
  • 东阿网站建设美国疫情最新情况
  • 如何自己创造网站足球比赛统计数据
  • 网站优化 月付费怎样注册个人网站
  • 百度网址大全官方网站外贸营销网站建设
  • 做网站查询违章免费单页网站在线制作
  • 怎么自己制作app郑州seo关键词
  • 为什么做的网站预览出来什么都没有企业网站建设的重要性
  • 做电商的女人不干净西安seo专员
  • 怎么用vps的linux做网站广告营销案例100例
  • 手机编程工具搜索引擎优化宝典