惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
The Cloudflare Blog
Last Week in AI
Last Week in AI
月光博客
月光博客
Security Latest
Security Latest
Project Zero
Project Zero
博客园 - 司徒正美
AWS News Blog
AWS News Blog
雷峰网
雷峰网
博客园 - 聂微东
C
Cybersecurity and Infrastructure Security Agency CISA
P
Palo Alto Networks Blog
人人都是产品经理
人人都是产品经理
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
A
About on SuperTechFans
V
V2EX
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
美团技术团队
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
C
Cisco Blogs
PCI Perspectives
PCI Perspectives
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
Spread Privacy
Spread Privacy
S
Securelist

博客园 - zhangbaoyu

Asp.net项目因Session阻塞导致页面打开速度变慢 jquery.chosen.js实现模糊搜索 SQL Server 使用日志传送 SQL Server 2008 R2 主从数据库同步 JavaScript及C# URI编码详解 sql server日期时间函数 MySQL十大优化技巧 - zhangbaoyu - 博客园 第一季 开封菜。。。。 Eval( " ")和DataBinder.Eval(Container.DataItem, " ") Navicat 一学生问英语老师“山寨”的英语怎么说,老师沉默不语。过了一会儿,幽幽的转过头来,一顿一顿的说道:made in china... MySQL DATE_FORMAT() 函数 js日期时间格式验证,时间比较 笔记本显卡排名 如何使用URL跳转解决Web服务80端口被封问题? 寒山诗选 c# 写入文件日志 - zhangbaoyu - 博客园 c# smtp发送邮件
vb.net sqlserver
zhangbaoyu · 2010-07-28 · via 博客园 - zhangbaoyu

2010-07-28 21:36  zhangbaoyu  阅读(345)  评论()    收藏  举报

Dim   strcon   As   String
                Dim   strsql   As   String
                Dim   con   As   SqlConnection
                Dim   com   As   SqlCommand
                Dim   databasepath   As   String
                Dim   pos   As   Integer

                databasepath   =   Application.ExecutablePath
                pos   =   InStrRev(databasepath,   "\ ")
                databasepath   =   Mid(databasepath,   1,   pos)   &   "backup\databaseback.bak "
               
                strcon   =   "server=localhost;database=humanadministration;uid=cxl;pwd=cxl; "
                con   =   New   SqlConnection(strcon)
                strsql   =   "backup   database   yourdatabase   to   disk= ' "   &   databasepath   &   " ' "
                com   =   New   SqlCommand(strsql,   con)

                Try

                        con.Open()
                        com.ExecuteNonQuery()
                        MessageBox.Show( "数据库备份成功! ",   "信息提示: ",   MessageBoxButtons.OK,   MessageBoxIcon.Information)

                Catch   ex   As   Exception
                        MessageBox.Show(ex.Message,   "错误提示: ",   MessageBoxButtons.OK,   MessageBoxIcon.Exclamation)
                Finally
                        con.Close()
                End   Try