Advertisement

06.11.2008 at 06:54AM PDT, ID: 23475764
[x]
Attachment Details

{"ORA-01036: illegal variable name/number\n"} Urgent.

Asked by mathieu_cupryk in Oracle 10.x, Microsoft Visual Basic.Net, Microsoft Visual C#.Net

I am stuck and I don't know where I am going wrong. any help would be greatly appreciated.

{"ORA-01036: illegal variable name/number\n"}

{"Method may only be called on a Type for which Type.IsGenericParameter is true."}

{Name = "Int32" FullName = "System.Int32"}

System.Data.OracleClient.OracleException was caught
  Message="ORA-01036: illegal variable name/number\n"
  Source="System.Data.OracleClient"
  ErrorCode=-2146232008
  Code=1036
  StackTrace:
       at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
       at System.Data.OracleClient.OracleParameterBinding.Bind(OciStatementHandle statementHandle, NativeBuffer parameterBuffer, OracleConnection connection, Boolean& mustRelease, SafeHandle& handleToBind)
       at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
       at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
       at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DbCommand command)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command)
       at Cwb.InitialPriceReporting.Form1.Mode0_SaveInsertPriceListHeader() in C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReporting\Form1.cs:line 180

 try
                {
                    // Create the Database object, using the default database service. The
                    // default database service is determined through configuration.
                    // Database db = DatabaseFactory.CreateDatabase("InitialPrices.Properties.Settings.ConnectionString");

                    Database db = DatabaseFactory.CreateDatabase("InitialPrices.Properties.Settings.ConnectionString");


                    // Create the DbCommand object
                    DbCommand dbCommand = db.GetStoredProcCommand("insert_price_list_hdr");
                    dbCommand.CommandTimeout = 180;

                    db.AddInParameter(dbCommand, "@p_price_list_hdr_id", DbType.String, txtCropYear.Text + txtListNo.Text);
                    db.AddInParameter(dbCommand, "@p_wht_tough_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_wht_damp_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_wht_stone_disc_amt", DbType.Decimal, 0);

                    db.AddInParameter(dbCommand, "@p_durum_tough_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_durum_damp_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_durum_stone_disc_amt", DbType.Decimal, 0);

                    db.AddInParameter(dbCommand, "@p_bly_tough_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_bly_damp_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_bly_stone_disc_amt", DbType.Decimal, 0);

                    db.AddInParameter(dbCommand, "@p_desigtd_bly_tough_disc_amt", DbType.Decimal, 0);
                    db.AddInParameter(dbCommand, "@p_desigtd_bly_damp_disc_amt", DbType.Decimal, 0);

                    db.AddInParameter(dbCommand, "@p_price_list_status_type_name", DbType.String, "0");
                    db.AddInParameter(dbCommand, "@p_load_dtm", DbType.DateTime, System.DateTime.Now);
                    db.AddInParameter(dbCommand, "@p_user_name", DbType.String, "Mathieu");


                    db.AddInParameter(dbCommand, "@p_wht_indr_flag", DbType.String, "0");
                    db.AddInParameter(dbCommand, "@p_durum_indr_flag", DbType.String, "0");
                    db.AddInParameter(dbCommand, "@p_bly_indr_flag", DbType.String, "0");
                    db.AddInParameter(dbCommand, "@p_desigtd_bly_indr_flag", DbType.String, "0");

                    db.AddInParameter(dbCommand, "@p_load_type_name", DbType.String, "Adjustment");

                    db.AddInParameter(dbCommand, "@p_wht_basis_num", DbType.Decimal, 1);
                    db.AddInParameter(dbCommand, "@p_durum_basis_num", DbType.Decimal, 1);
                    db.AddInParameter(dbCommand, "@p_bly_basis_num", DbType.Decimal, 1);
                    db.AddInParameter(dbCommand, "@p_desigtd_bly_basis_num", DbType.Decimal, 1);
                   
                   
                    db.AddInParameter(dbCommand, "@p_pool_part_code", DbType.String, "1");
                    db.AddInParameter(dbCommand, "@p_sct_price_list_name", DbType.String, "1");
                    db.AddInParameter(dbCommand, "@p_effctv_dtm", DbType.DateTime, System.DateTime.Now);
                    db.AddInParameter(dbCommand, "@p_row_cnt_qty", DbType.Decimal, 1);
                    db.AddInParameter(dbCommand, "@p_price_sum_amt", DbType.Decimal, 0);
                    db.ExecuteNonQuery(dbCommand);

                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
Stored proc:
 
create or replace PACKAGE BODY PRICE_LIST_REPORTING
AS
    PROCEDURE insert_price_list_hdr (
        p_price_list_hdr_id             IN OUT   price_list_hdr.price_list_hdr_id%TYPE,
        p_wht_tough_disc_amt		IN	 price_list_hdr.wht_tough_disc_amt%TYPE,
        p_wht_damp_disc_amt		IN	 price_list_hdr.wht_damp_disc_amt%TYPE,	
        p_wht_stone_disc_amt		IN	 price_list_hdr.wht_stone_disc_amt%TYPE,
        
        p_durum_tough_disc_amt		IN	 price_list_hdr.durum_tough_disc_amt%TYPE,
        p_durum_damp_disc_amt		IN	 price_list_hdr.durum_damp_disc_amt%TYPE,
        p_durum_stone_disc_amt		IN	 price_list_hdr.durum_stone_disc_amt%TYPE,
        
        p_bly_tough_disc_amt		IN	 price_list_hdr.bly_tough_disc_amt%TYPE,
        p_bly_damp_disc_amt		IN	 price_list_hdr.bly_damp_disc_amt%TYPE,
        p_bly_stone_disc_amt		IN	 price_list_hdr.bly_stone_disc_amt%TYPE,
        
        p_desigtd_bly_tough_disc_amt	IN	 price_list_hdr.desigtd_bly_tough_disc_amt%TYPE,
        p_desigtd_bly_damp_disc_amt	IN	 price_list_hdr.desigtd_bly_damp_disc_amt%TYPE,
      
        p_price_list_status_type_name   IN       price_list_hdr.price_list_status_type_name%TYPE,
        p_load_dtm                      IN       price_list_hdr.load_dtm%TYPE,
        p_user_name                     IN       price_list_hdr.user_name%TYPE,
       
        p_wht_indr_flag                 IN       price_list_hdr.wht_indr_flag%TYPE,
        p_durum_indr_flag               IN       price_list_hdr.durum_indr_flag%TYPE,
        p_bly_indr_flag                 IN       price_list_hdr.bly_indr_flag%TYPE,
        p_desigtd_bly_indr_flag         IN       price_list_hdr.desigtd_bly_indr_flag%TYPE,
       
        p_load_type_name                IN       price_list_hdr.load_type_name%TYPE,
          
       
        p_wht_basis_num                 IN       price_list_hdr.wht_basis_num%TYPE,
        p_durum_basis_num               IN       price_list_hdr.durum_basis_num%TYPE,
        p_bly_basis_num                 IN       price_list_hdr.bly_basis_num%TYPE,
        p_desigtd_bly_basis_num         IN       price_list_hdr.desigtd_bly_basis_num%TYPE,
        
        p_src_file_path_desc            IN       price_list_hdr.src_file_path_desc%TYPE,
        p_pool_part_code                IN       price_list_hdr.pool_part_code%TYPE,
        p_sct_price_list_name           IN       price_list_hdr.sct_price_list_name%TYPE,
        p_sct_effctv_dtm                IN       price_list_hdr.sct_effctv_dtm%TYPE,
        
        p_row_cnt_qty                   IN       price_list_hdr.row_cnt_qty%TYPE,
        p_price_sum_amt                 IN       price_list_hdr.price_sum_amt%TYPE
    )
    IS
    BEGIN
        INSERT INTO price_list_hdr
                    (price_list_hdr_id, 
                     wht_tough_disc_amt,
                     wht_damp_disc_amt,
                     wht_stone_disc_amt,
                     durum_tough_disc_amt,
                     durum_damp_disc_amt,
                     durum_stone_disc_amt,
                     bly_tough_disc_amt,
                     bly_damp_disc_amt,
                     bly_stone_disc_amt,
                     desigtd_bly_tough_disc_amt,
                     desigtd_bly_damp_disc_amt,
                     price_list_status_type_name,
                     load_dtm,
                     user_name, 
                     
                     wht_indr_flag,
                     durum_indr_flag,
                     bly_indr_flag,
                     desigtd_bly_indr_flag,
                     
                     load_type_name,
                     
                     wht_basis_num,     
                     durum_basis_num, 
                     bly_basis_num,
                     desigtd_bly_basis_num,
                     
                     src_file_path_desc,
                     pool_part_code,  
                     sct_price_list_name,
                     sct_effctv_dtm, 
                     
                     row_cnt_qty, 
                     price_sum_amt
                    )
             VALUES ( p_price_list_hdr_id,           
                      p_wht_tough_disc_amt,		
                      p_wht_damp_disc_amt,		
                      p_wht_stone_disc_amt,		
                      
                      p_durum_tough_disc_amt,		
                      p_durum_damp_disc_amt,		
                      p_durum_stone_disc_amt,		
                      
                      p_bly_tough_disc_amt,		
                      p_bly_damp_disc_amt,		
                      p_bly_stone_disc_amt,		
                      
                      p_desigtd_bly_tough_disc_amt,	
                      p_desigtd_bly_damp_disc_amt,	
                      
                      p_price_list_status_type_name, 
                      p_load_dtm,                    
                      p_user_name,                   
                      
                      p_wht_indr_flag,               
                      p_durum_indr_flag,             
                      p_bly_indr_flag,               
                      p_desigtd_bly_indr_flag,       
                      
                      p_load_type_name,              
                        
                      
                      p_wht_basis_num,               
                      p_durum_basis_num,             
                      p_bly_basis_num,               
                      p_desigtd_bly_basis_num,       
                      
                      p_src_file_path_desc,          
                      p_pool_part_code,              
                      p_sct_price_list_name,         			
                      p_sct_effctv_dtm,              
                      
                      p_row_cnt_qty,                 
                      p_price_sum_amt               
);
 END insert_price_list_hdr;
[+][-]06.11.2008 at 07:17AM PDT, ID: 21760262

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 07:38AM PDT, ID: 21760504

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 07:43AM PDT, ID: 21760553

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 09:15AM PDT, ID: 21761596

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 09:28AM PDT, ID: 21761712

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Oracle 10.x, Microsoft Visual Basic.Net, Microsoft Visual C#.Net
Sign Up Now!
Solution Provided By: sdstuber
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.11.2008 at 11:36AM PDT, ID: 21762863

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 11:39AM PDT, ID: 21762895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 12:50PM PDT, ID: 21763548

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 12:57PM PDT, ID: 21763608

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 01:43PM PDT, ID: 21764019

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628