当前位置:网站首页>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
边栏推荐
- Green bamboo biological sprint Hong Kong stocks: loss of more than 500million during the year, tiger medicine and Beijing Yizhuang are shareholders
- Experience home office, feel the completion of the project | community essay solicitation
- PhD Debate-11 预告 | 回顾与展望神经网络的后门攻击与防御
- 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
- Eye of depth (III) -- determinant of matrix
- 2022 interview questions
- Role and function of uboot
- Linux Installation PostgreSQL + Patroni cluster problem
- The beginning of life
- Flutter: 动作反馈
猜你喜欢
Cell:清华程功组揭示皮肤菌群的一种气味挥发物促进黄病毒感染宿主吸引蚊虫...
[error record] error -32000 received from application: there are no running service protocol
Eth data set download and related problems
Exploration of mobile application performance tools
Geoserver: publishing PostGIS data sources
The macrogenome microbiome knowledge you want is all here (2022.7)
TCP拥塞控制详解 | 2. 背景
一文看懂:数据指标体系的4大类型
智能垃圾桶(五)——点亮OLED
TCP congestion control details | 2 background
随机推荐
[essay solicitation activity] Dear developer, RT thread community calls you to contribute
P6774 [noi2020] tears in the era (block)
人生的开始
Exploration of mobile application performance tools
Changwan group rushed to Hong Kong stocks: the annual revenue was 289million, and Liu Hui had 53.46% voting rights
2、 Expansion of mock platform
剑指 Offer 27. 二叉树的镜像
Leetcode question brushing record | 933_ Recent requests
Ap和F107数据来源及处理
IP address translation address segment
Sword finger offer 25 Merge two sorted linked lists
綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
IP地址转换地址段
TCP congestion control details | 2 background
【征文活动】亲爱的开发者,RT-Thread社区喊你投稿啦
[shutter] dart data type (dynamic data type)
871. 最低加油次数
Smart trash can (V) - light up OLED
剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
QWebEngineView崩溃及替代方案