Database View Usage
ViewBy using views, we can string together items to be used from multiple tables into a virtual table. Calling the virtual table can simplify the complexity of statements.CREATE VIEW view Create viewDROP VIEW view Drop viewIf you need to update a view, you can delete it first and then create it anew, or use CREATE OR REPLACE VIEW view to update it. The statement means if a view with the same name exists, overwrite it; otherwise, create a virtual table.When using views, we should avoid creatin...
数据库视图使用
视图(view)通过对视图的使用,我们可以将多个表的待使用项串联成一个虚拟表,通过对虚拟表的调用,可以节省语句的复杂程度。CREATE VIEW view 创建视图DROP VIEW view 删除视图如果需要更新视图,可以先进行删除然后新建也可以使用CREATE OR REPLACE VIEW view进行更新,语句的意思是如果有同名称则覆盖没有则创建一个虚拟表格。我们在使用视图时,应该避免创建过多的视图联结,在使用多个视图联结是需要测试一下运行时间code: 123456789drop view generalview;create view generalview asselect p1.aeu_name,p2.geu_name,p3.sgeu_name,p3.sgeu_idfrom allerrorunits as p1,generalerrorunits as p2,subgeneralerrorunits as p3where p1.aeu_id = p2.geu_aeu_id and p2.geu_id = p3.sgeu_geu_id;select *from g...
Database Connection Encryption in App.config File
Be sure to run as administrator, otherwise the object already exits problem will occur. Change the file name to Web.config, start the command line tool Tools -> Command Line, enter aspnet_regiis -pef "**Target String**" " **Target Address(e:\)** . Afterward, change Web.config back to App.config and it can be accessed.We need the ConfigurationManager class when accessing. Use VS shortcut ctrl+. to use NuGet for quick deployment. https://blog.csdn.net/u011981242/article/detail...
App.config文件中数据库连接加密
*一定要用管理员身份运行,不然会出现 object already exits的问题* 将文件名称修改为Web.config,启动命令行工具工具->命令行输入aspnet_regiis -pef "**目标字符串**" " **目标地址(e:\)** 之后将Web.config修改回App.config即可访问在我们访问时需要ConfigurationManager类,使用VS快捷键ctrl+.使用nuget进行快速布置 https://blog.csdn.net/u011981242/article/details/51090487
C# Software Auto-update via Database
Idea I read many blogs using local and server XML documents for updates, so I wondered if this could be done using a database.The basic idea is consistent with the general way. There will be a local XML file recording version number, update time, and local software address info. xml1234567891011<?xml version="1.0" encoding="utf-8" ?><AutoUpDater> <URLAdres url =""/> <UpdateInfo> <UpdateTime Date="2020-05-20"/> <...
C#通过数据库进行软件的自动更新
思路 看了许多博客是利用本地和服务器的xml文档进行更新,便想着能不能用数据库完成这个操作基本思路与一般的方式一直,本地会有一个xml文件里面记录版本号更新时间软件本地地址信息 xml1234567891011<?xml version="1.0" encoding="utf-8" ?><AutoUpDater> <URLAdres url =""/> <UpdateInfo> <UpdateTime Date="2020-05-20"/> <Version Num="1.0.1"/> </UpdateInfo> <FilePath> <Path Str="E:\Visual Studio 2019 Project\ConsoleApp\ConsoleApp"/> </FilePath></AutoUpDat...
How to Compare Version Numbers in C#
Reference Article: C# How to compare version numbersIn C#, there is a Version class that can be used to compare version numbers.
c#如何比较版本号的大小
参照文章:C# 如何比较版本号大小在c#中有version类可以进行版本号的比较
Mysql指定用户访问特定数据库
今天使用新建用户访问云服务器的mysql发现一只报错并且只能访问infomation_schema数据库,按照博客上的办法输入指令grant all privileges on test_db.* to testuser@localhost identified by "123456" mysql一直报错一直按照博客上面进行赋予权限在报错,感觉应该是版本不一致导致的命令改变。果然,我在refman-8.0-en的说明文档中找到了这个命令由于刚接触mysql所以大部分依赖于博客和baidu,其实应该将这些查询办法与说明文档进行对照,不能一昧的相信单一解决办法导致把宝贵的工作时间浪费在无意义的debug中。
Mysql Assign User to Access Specific Database
Today, using a new user to access the mysql of the cloud server, I found that an error was reported and I could only access the infomation_schema database. Following the method on the blog to enter the command grant all privileges on test_db.* to testuser@localhost identified by "123456", mysql kept reporting errors.I have been following the blog to grant permissions but it reports errors. I feel it should be due to version inconsistency causing command changes.Sure enough, I found ...
mysql在Windows server 2012R2配置缺少vcruntime140_1.dll文件解决办法
由于我安装的是mysql8.0.20安装的c++是2015应该是版本不一致导致每次检索都会出现缺少vcruntime140_1.dll文件,可以通过链接下载2015-2019版进行dll的更新
mysql Missing vcruntime140_1.dll File Solution on Windows server 2012R2
Since the mysql I installed is 8.0.20 and the installed c++ is 2015, it should be the version inconsistency that causes the missing vcruntime140_1.dll file every time retrieving. You can download the 2015-2019 version for dll update through link.
使用NSIS制作revit插件安装包
@TOC 使用NSIS制作revit插件安装包下载NSIS DOWNLOADHM NSIS Addin文件==我们需要将addin文件进行单独存放==位置放在读取文件的section后就可 修改脚本文件 增加对addin文件的路径自动修改 1234567891011 Section change StrCpy $1 "<Assembly>" StrCpy $1 "$1$INSTDIR" StrCpy $1 "$1\bin\De··bug\Panel.dll</Assembly>" Push <Assembly>name.dll</Assembly> #text to be replaced Push $1 #replace with Push all #replace all occurrences Push all #replace all occurrences Push C:\ProgramData\Autodesk\Rev...
Use NSIS to Create Revit Plugin Installer
@[TOC](Table of Contents) Use NSIS to Create Revit Plugin InstallerDownloadNSIS DOWNLOADHM NSIS Addin File==We need to store the addin file separately==Just place it after the section reading the file Modify Script File Add automatic modification of addin file path 1234567891011 Section change StrCpy $1 "<Assembly>" StrCpy $1 "$1$INSTDIR" StrCpy $1 "$1\bin\De··bug\Panel.dll</Assembly>" Push <Assembly>name.dll</Assembly&g...
Revit Secondary Development Dockable Panel Click Button Interaction with Revit Main Window
Create Dockable WindowGithub AddressAddress ReferenceThe Building CoderCSDN Revit Secondary Development Dockable WindowRevit Secondary Development - Non-modal Window and Revit Window Focus SwitchingRain Flower Pick - Revit Secondary Development ExternalEvent Implement Non-modal FormRevit Secondary Development Entry: Chapter 9 Events Create WPF Window After adding WPF window, modify usercontrol to Page, F7 cut into background also modify to Page. Also need to referenceAutodesk.Revit.UI.IDockab...
revit二次开发可停靠面板上点击按钮与revit主窗口交互
创建可停靠窗口Github地址Address 引用The Building CoderCSDN Revit二次开发之可停靠窗口Revit二次开发——非模态窗口与Revit窗口焦点切换雨花拾-Revit二次开发之ExternalEvent实现非模态窗体Revit二次开发入门:第九章事件 创建WPF窗口 添加完WPF窗口后将usercontrol修改为Page,F7切入后台同样修改为Page,同时需要引用Autodesk.Revit.UI.IDockablePaneProvider页面位置使用Dockpositon枚举值进行控制,进行选择位置即可,页面此时就创建完成,按照自己需要添加UI布局即可 12345678910111213141516171819public partial class UserControl1 : Page,Autodesk.Revit.UI.IDockablePaneProvider { public UserControl1() { InitializeComponent();...
Revit Secondary Development Import Component Info to Database
Data volume of components in revit is large. Database is needed when doing standardization or audit software. Importing data into database enables calculation to verify separated from software, which is also a kind of burden reduction for alternative software. demo Get component - Test project casually select several components to output data 1234567891011121314151617UIDocument uidoc = commandData.Application.ActiveUIDocument; Document doc = uidoc.Document; var refer = ui...
Revit二次开发 将构件信息导入到数据库中
revit中构件数据量较大,在做标准化或者审核软件的时候需要用到数据库,将数据导入数据库使得计算能够脱离软件进行计算也算是一种另类的软件减负 demo 获取构件-测试项目随便框选几个构件进行输出数据 1234567891011121314151617UIDocument uidoc = commandData.Application.ActiveUIDocument; Document doc = uidoc.Document; var refer = uidoc.Selection.PickObjects(ObjectType.Element, "pick onjects"); List<string> categorys = new List<string>(); List<int> elementIds = new List<int>(); List<string> symbolNames = ...
MySQL String Error in insert into Statement
When passing values, looking at C# code directly passing string value, error reported showing matching column not found 1command += "INSERT INTO " + TableName + "(data_id,data_desc,data_price) VALUES(" + ids[i] + ", " + description[i] + "," + price[i] + ");"+"\r\n"; After the running error, I found that I didn’t consider that the command is passed completely in string form. At this time, the string passed by description does not have...
MySQL insert into 语句中字符串报错
在传入值时,在C#中代码直接传入string值,报错显示未找到符合列 1command += "INSERT INTO " + TableName + "(data_id,data_desc,data_price) VALUES(" + ids[i] + ", " + description[i] + "," + price[i] + ");"+"\r\n"; 运行出错后发现是自己没有考虑到命令全部以字符串形式传入,此时description传入的字符串未带有双引号“ “,命令的字符串形式为: 12"insert into table (data_id,data_desc,data_price)value(111,description,1.001)" 可以看到description没有双引号所以命令出错,需要修改命令description加入单引号即可 1", '" + description[i] + &qu...









