当前搜索:
1、任何在where子句中使用is null或is not null的语句优化器是不允许使用索引的。因为只有该字段中有null值,即使创建了索引其实也是没有用的,所以创建索引应该在有值的字段上创建;2、使用该sql语句将不会使用索引:select * from employee where las...
当前系统日期 Date();当前系统时间 Time();如: Label1->Caption =DateToStr(Date()); Label2->Caption =TimeToStr(Time());
数据集->fieldByName(字段名称)->AsString (字段是字符串类型)
数据集->fieldByName(字段名称)->AsInteger (字段是整型)
数据集-&g...
1.public static class Interlocked2.Add(Int32, Int32)
对两个 32 位整数进行求和并用和替换第一个整数,上述操作作为一个原子操作完成。
Add(Int64, Int64)
对两个 64 位整数进行求和并用和替换第一个整数,上述操作作为一个原子...
string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff");//获得系统时间
time = System.Text.RegularExpressions.Regex.Replace(tim...
C++Builder常用快捷键:
:: 项目管理类
::
F10
代码窗口全屏显示时切换到BCB的主窗口
Ctrl + F12
打开源文件清单对话框
Shift + F1...
------解决方案--------------------
窗体的 Position属性设置成poScreenCenter
如:FormMain->Position=poScreenCenter;
------解决方案--------------------
原理就是:
Left...
using System;
namespace ConsoleApplication2
{
internal class Program
{
private static void Main(string[] args)
{
...
private void SaveFileDialog()
{
//string localFilePath, fileNameExt, newFileName, FilePath;
SaveFileDialog saveFileDi...
public static Vector operator +(Vector lhs, Vector rhs)
{
//运算符重载代码
}
运算符重载的声明方式与方法的声明方式相同,但operator关键字告诉编译器,它实际上是一个运算符重...
internal class Program
{
private static void Main(string[] args)
{
me mm = new me { name = "asS", password ...
按编写.NET代码的规则,字段(除了const字段以外)应总是私有的,并由公有属性封装,可能是为了安全性吧
字段修饰符为private或者proteced
属性修饰符为public
private void Form1_Load(object sender, EventArgs e)
{
PrintDocument myPrint = new PrintDocument();
PrintPreviewDialog...
在vs编辑器中有时需要批量删除无用的空白行,为此,可以使用vs编辑器的查找替换功能:
1. Ctrl+H,打开替换功能框。
2.选择“使用正则表达式”,“当前文档”。
3.在查找框中输入:
(?
4.全部替换
namespace WindowsFormsApplication8
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
...
string str = Request.Form["txtTest"].Trim();
if (str != "")
{
string[] a = str.Split('...
当有多个条件查询数据库表中的记录时,只需要将各个条件用and或者or即可,与条件顺序无关。
如:
select * from Table_login where name = 'wp'and password='1' and pp='pp'and qq='qq' or qq='dd'