当前位置:网站首页>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
边栏推荐
- 七张图,学会做有价值的经营分析
- Digital IC hand tearing code -- voting device
- How to quickly distinguish controlled components from uncontrolled components?
- TCP congestion control details | 2 background
- Cell: Tsinghua Chenggong group revealed an odor of skin flora. Volatiles promote flavivirus to infect the host and attract mosquitoes
- What is the difference between JSP and servlet?
- Believe in yourself and finish the JVM interview this time
- dstat使用[通俗易懂]
- 默认浏览器设置不了怎么办?
- [essay solicitation activity] Dear developer, RT thread community calls you to contribute
猜你喜欢
超卓航科上市:募资9亿市值超60亿 成襄阳首家科创板企业
Sword finger offer 27 Image of binary tree
[error record] error -32000 received from application: there are no running service protocol
Easy language ABCD sort
七张图,学会做有价值的经营分析
The computer comes with software to make the background color of the picture transparent (matting white background)
OpenHarmony如何启动远程设备的FA
【Leetcode】14. 最長公共前綴
【Leetcode】14. 最长公共前缀
使用知行之桥的API端口,提供资源供合作伙伴访问
随机推荐
Digital IC hand tearing code -- voting device
详细介绍scrollIntoView()方法属性
Weili holdings listed on the Hong Kong Stock Exchange: with a market value of HK $500million, it contributed an IPO to Hubei
深度之眼(三)——矩阵的行列式
IP address translation address segment
The beginning of life
OpenPose的使用
What is generics- Introduction to generics
MOSFET器件手册关键参数解读
智能垃圾桶(五)——点亮OLED
Fuyuan medicine is listed on the Shanghai Stock Exchange: the market value is 10.5 billion, and Hu Baifan is worth more than 4billion
Learning Weekly - total issue 60 - 25th week of 2022
Sword finger offer 26 Substructure of tree
Configure MySQL under Linux to authorize a user to access remotely, which is not restricted by IP
Talk about an experience of job hopping and being rejected
class和getClass()的区别
关于举办科技期刊青年编辑沙龙——新时代青年编辑应具备的能力及提升策略的通知...
Does digicert SSL certificate support Chinese domain name application?
Eye of depth (III) -- determinant of matrix
linux安装postgresql + patroni 集群问题