总结刚结束的机房合作只有一种感觉那就是:好多好多东西自己都不会,又有好多东西在这次合作中学到了,总之就是痛并快乐着! 接下来就谈谈在退卡时调用存储过程PROC_ReturnCard时出现错误及解决过程。图如下: 刚开始的时候就考虑到D层的参数是不是写的过多
总结刚结束的机房合作只有一种感觉那就是:“好多好多东西自己都不会,又有好多东西在这次合作中学到了,总之就是痛并快乐着!”
接下来就谈谈在退卡时调用存储过程PROC_ReturnCard时出现错误及解决过程。图如下:
刚开始的时候就考虑到D层的参数是不是写的过多了,于是在数据库中查几遍参数都一样啊!为什么就是不行呢?于是上网查了下:有以下几种情况
一、如果你的参数添加是在循环体内完成第2次时就会重复添加,此时触发参数过多异常
解决方法1,参数在循环体外添加,for内部只赋值和取返回值
解决方法2,每次循环清空参数Parameters.Clear();
二、普通调用
1、存储过程调用错了(一般是存储过程名字字母错误)。
2、用户创建的存储过程与系统存储过程同名。如果以sp开头,用户创建的存储过程,总会先检查master数据库(即使该存储过程已用数据库名称限定)。 如果用户创建的存储过程与系统存储过程同名,则永远不执行用户创建的存储过程 ,因此自定义存储过程不要与系统存储过程同名
3、超过指定的参数。以上情况你的代码中均没有出现,目前最大的可能性是你连接的数据库中存储过程中的参数确实没有那么多,而你改的是另一个数据库中的存储过程!
4、清空参数Parameters.Clear();
由于我的属于第二种情况经过以上的排查感觉,第一种存储过程名称写错绝对不可能(自我感觉良好)第二种也排除,因为我严格按命名规范来的。第三种情况已经查过好多次数据库了没错啊!因此就开始找第四中的解决办法,结果还是不行。只好找人帮忙他在程序运行时,突然发现我调用的存储过程的名字不对,这时我立刻晕死!明明是PROC_ReturnOut 而我却写成了PROC_SelectCheckOut这么低级的错误,竟然让我忙活了一下午。更不可原谅的是自己就没有检查却肯定这是对的,没有验证就下结论,这定是死罪!
因此通过这个小小的错误,必须得做自我反思,今后在做事情的时候千万不要以“我认为、、、”来下定论。一定要经过实际排查不放过任何细节,不能凭空想象,只有做过了才有资格发表评论。就让我们以小见大来看待这个问题并做出反思!

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.