当前位置:网站首页>executescalar mysql_ ExecuteScalar()
executescalar mysql_ ExecuteScalar()
2022-07-02 17:19:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
ExecuteScalar() The purpose of the method is to :
Execute the query , And return the first column of the first row in the result set returned by the query . All other columns and rows are ignored .
When its return value object, If you want to judge whether a piece of data exists in the database, you can use this method ,
//sql writing
private string m_str_variationInfo = @”SELECT variationinfoMngno
FROM sellersandvariationmngtbl
WHERE sellerCD= @sellerCD
“;
// Handle
MySqlParameter[] MySqlParameter = new MySqlParameter[1];
MySqlParameter[0] = new MySqlParameter(“@sellerCD”, prm_sellerCD);
object val = DataAccess.ExecuteScalar(prm_con, CommandType.Text, m_str_variationInfo, MySqlParameter);
return val;
Judge val Whether it is empty can be read-only. Does the data save exist .
ExecuteScalar() Use of methods
ExecuteScalar() The purpose of the method is to : Execute the query , And return the first column of the first row in the result set returned by the query . All other columns and rows are ignored . 1. Back to a object type , That is to say, it is the base class of all data types , According to the se …
[SqlServer] How to insert single quotation marks into the database (') String
Today, when doing a copy function , Found a single quoted string and INSERT INTO Of the statement ’ ‘ Conflict . Found such a function on the network How to insert single quotation marks into the database (‘) String use SQL Statement to a field in the database ( character …
following C# The output of the program is ( ).
The output of the following program is ( ). using System; namespace HoverTreeTikuConsole { class Program { static void Main(strin …
After the page loads , Triggering event ——trigger()
Click on the I
linux/unix Programming manual fork() function
Parent process passed fork() Function create subprocess , Copy the contents of the data segment and stack of the parent process to the child process , The subprocess executes the program execve Create a new program , call exit Function exits to wait wait(), Suspend the parent process , Parent child processes share the same program text segment . …
setInterval() And clearInterval() An interesting little phenomenon of
In use today setInterval() when , I found an interesting thing The code is as follows : var box=document.getElementById(“box”);// obtain id by “box” Of …
HTML DOM Object createElement() Method
I'm learning today DOM Node operation , Found out how to create DOM Node createElement() An interesting phenomenon of method . The code is as follows : var box=document.getElementById(“box …
join() My opinion on the method
JavaScript join() Method Definition and Usage join() Method is used to put all elements in an array into a string . The elements are separated by the specified separator . grammar arrayObject.join(separa …
Random recommendation
[LeetCode] Linked List Cycle II Ring two in a single linked list
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Foll …
javascript understand js Closure in
stay javascript The variable in has its scope , If it's inside a function var A variable , In general, it cannot be referenced outside the function . function outerFun() { ; alert(a); } ; outerF …
System.Data.DbType Mapping relationship with database
There are the following types of mapping comparisons : System.Data.SqlClient.SqlDbType System.Data.OleDb.OleDbType System.Data.Odbc.OdbcType S …
bootstrap Editable drop-down box jquery.editable-select
After searching for a long time, I found that I downloaded it somewhere jquery.editable-select Points are required , So it's convenient to sort it out others . First go to the download link :http://pan.baidu.com/s/1kUXvwlL pass …
Java Collection source analysis ( 3、 ... and )Vevtor and Stack
Preface I wrote an article about LinkedList In addition to its slightly complicated data structure , Everything else is easy to understand . This article talks about the possibility that you seldom use it in development . But sometimes it may be used ! Notice that before learning this one , need …
Interface automation :HttpClient + TestNG + Java( Four ) – Packaging and testing post Method request
In the last one , We have made preliminary optimization and assertion for the first automated interface test case , This one we deal with POST request . 4.1 send out POST Method request post Methods and get The method is when we do interface testing , The main methods to deal with in most scenarios . …
nginx error 502 upstream sent too big header while reading response header from upstream
see nginx Error log for , Get the following error message :upstream sent too big header while reading response header from upstream Literally …
Django Connect oracle Those problems of database
Environmental Science : windows 7 64 position python 3.6.5 32 position oracle client 11.2 32 position django1.11.20 (django2.x Version not supported oracle client 11g 了 ) cx_ …
Declaration register ROM
:] ROM [:] ; integer i; initial begin ;i<=;i=i+) begin ROM[i] <= { {‘b0}}; end end At the same time, dual ports can be considered ROM …
eclipse Show xml Tips
When the network speed is slow , You can add local dtd. window Under the preferces, Input xml, find xml catalog next
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/148034.html Link to the original text :https://javaforall.cn
边栏推荐
- Shutter: action feedback
- Smart trash can (V) - light up OLED
- A few lines of code to complete RPC service registration and discovery
- PhD Debate-11 预告 | 回顾与展望神经网络的后门攻击与防御
- [essay solicitation activity] Dear developer, RT thread community calls you to contribute
- [shutter] dart data type (dynamic data type)
- Detailed explanation of @accessories annotation of Lombok plug-in
- 【Leetcode】13. Roman numeral to integer
- Ocio V2 reverse LUT
- Sword finger offer 22 The penultimate node in the linked list
猜你喜欢
Win10系统使用pip安装juypter notebook过程记录(安装在系统盘以外的盘)
几行代码搞定RPC服务注册和发现
Goodbye, shucang. Alibaba's data Lake construction strategy is really awesome!
Tech talk activity preview | building intelligent visual products based on Amazon kVs
TCP拥塞控制详解 | 2. 背景
剑指 Offer 27. 二叉树的镜像
Xiaopeng P7 had an accident on rainy days, and the airbag did not pop up. Official response: the impact strength did not meet the ejection requirements
智能垃圾桶(五)——点亮OLED
【Leetcode】13. 罗马数字转整数
Atcoder beginer contest 169 (B, C, D unique decomposition, e mathematical analysis f (DP))
随机推荐
What will you do after digital IC Verification?
Eth data set download and related problems
详细介绍scrollIntoView()方法属性
R及RStudio下载安装教程(超详细)
Changwan group rushed to Hong Kong stocks: the annual revenue was 289million, and Liu Hui had 53.46% voting rights
QStyle实现自绘界面项目实战(二)
Listing of chaozhuo Aviation Technology Co., Ltd.: raising 900million yuan, with a market value of more than 6billion yuan, becoming the first science and technology innovation board enterprise in Xia
酒仙网IPO被终止:曾拟募资10亿 红杉与东方富海是股东
移动应用性能工具探索之路
ThreadLocal
书包网小说多线程爬虫[通俗易懂]
[shutter] dart data type (dynamic data type)
Interpretation of key parameters in MOSFET device manual
Green bamboo biological sprint Hong Kong stocks: loss of more than 500million during the year, tiger medicine and Beijing Yizhuang are shareholders
【Leetcode】13. Roman numeral to integer
The impact of telecommuting on all aspects of our experience | community essay solicitation
二、mock平台的扩展
Amazon cloud technology community builder application window opens
traceroute命令讲解
Youzan won the "top 50 Chinese enterprise cloud technology service providers" together with Tencent cloud and Alibaba cloud [easy to understand]