Catch bugs: RA-06550... NPLS-00306: number or type of parameters when 'Meeting _ notice_create 'is called

Source: Internet
Author: User

Catch bugs: "System. Data. OracleClient. OracleException: ORA-06550: 1st rows, 7th columns: \ nPLS-00306: number of parameters or type when 'Meeting _ NOTICE_CREATE 'is called

This error took me a long time (several hours) and threw it aside. Today, one parameter is excluded and the cause is finally known. T.T

The attribute of the object class does not have an initial value. This error occurs when the null value is inserted. So remember to assign a value. Set string to string. empty.

Codesmith for throwing an object class:

<% @ CodeTemplate Language = "C #" TargetLanguage = "Text" Src = "" Inherits = "" Debug = "False" Description = "Template description here." %>
<% @ Assembly Name = "SchemaExplorer" %>
<% @ Assembly Name = "System. Design" %>
<% @ Assembly Name = "System. Data. OracleClient" %>
<% @ Import Namespace = "System. Data. OracleClient" %>
<% @ Import Namespace = "SchemaExplorer" %>
<% @ Property Name = "SourceTables" Type = "SchemaExplorer. TableSchemaCollection" Category = "Connection" Description = "Tables of the sytem." %>
<% @ Assembly Name = "System. Data" %>
<% @ Import Namespace = "System. Data" %>
<% WriteData (); %>
<SCRIPT runat = "template">
// My methods here.
Public void writedata (){
Response. Write (@ "Private const int int_init = 0;
Private const string int_string = string. empty;
Private const datetime ini_date = system. datetime. maxvalue ;");
Response. Write ("\ r \ n ");

Foreach (tableschema table in sourcetables ){
// Response. Write ("public class" + Table. Name + "\ r \ n {\ r \ n ");
Foreach (columnschema column in table. columns ){
Response. write ("private" + getdbtype (column. datatype) [0] + "_" + column. name. tolower () + getdbtype (column. datatype) [1] + "; \ r \ n ");
Response. write ("// <summary> \ r \ N //" + column. description + "\ r \ N // </Summary> \ r \ n ");
Response. Write ("public" + getdbtype (column. datatype) [0] + "" + column. Name + "\ r \ n {\ r \ n ");
Response. Write ("Get {return _" + column. Name. tolower () + ";}\ r \ n ");
Response. Write ("set {_" + column. Name. tolower () + "= value;} \ r \ n ");
}
// Response. Write ("\ r \ n} \ r \ n ");
}
}

Public string GetDbTypeStr (System. Data. DbType type ){
Return type. ToString ();
}

Public string [] GetDbType (System. Data. DbType type ){
String ret = string. Empty;
String iv = string. Empty;

Switch (type ){
Case DbType. String:
Ret = "string ";
Iv = "= INI_STRING ";
Break;
Case (dbtype) system. Data. oracleclient. oracletype. Number:
Case dbtype. int32:
Ret = "int ";
IV = "= ini_int ";
Break;
Case dbtype. int16:
Ret = "short ";
IV = "= ini_int ";
Break;
Case DbType. Int64:
Ret = "int ";
Iv = "= INI_INT ";
Break;
Case DbType. DateTime:
Ret = "DateTime ";
Iv = "= INI_DATE ";
Break;
Case DbType. Boolean:
Ret = "bool ";
Break;
Case DbType. Decimal:
Ret = "decimal ";
Break;
Case DbType. Double:
Ret = "double ";
Break;
}
Return new string [] {ret, iv };
}
</Script>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.