Topic: SQL*Plus and PL/SQL >> Not all variables bound error
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: Not all variables bound error |
| Probi |
Posted: May 21, 2008 09:30:26 AM |
Total Post: 4
Joined: May, 2008
|
Hi,
I´m getting this problem, and I dont do anything different that in other cases when I use this code ( populate a dropdownList from Database)~
string pcode = "value";
string cmd = " Select id1, id2 from DataBase where id = :p1";
OracleCommand command = new OracleCommand(cmd, connection);
string[] id_1 = new sreing [100]; string[] id_2 = new string [100];
try
{
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("p1", pcode);
command.ExecuteNonQuery();
rdr1 = command1.ExecuteReader();
int i = 0;
while (rdr1.Read())
{
id_1[i] = rdr1[0].ToString();
id_2[i] = rdr1[1].ToString();
i++;
}
OracleDataAdapter ad1 = new OracleDataAdapter(cmd, connection);
DataSet ds1 = new DataSet();
ad1.Fill(ds1);
DataView dw1 = new DataView(ds1.Tables[0]);
DropDownList1.DataSource = dw1;
DropDownList1.DataBind();
for (int l = 0; l < DropDownList1.Items.Count; l++)
{
DropDownList1.Items[l].Text = id_1[l];
DropDownList1.Items[l].Value = id_2[l];
}
I get the following error
Source Error:
Line 111: OracleDataAdapter ad1 = new OracleDataAdapter(cmd1, connection);
Line 112: DataSet ds1 = new DataSet();
Line 113: ad1.Fill(ds1);
Line 114: DataView dw1 = new DataView(ds1.Tables[0]);
Line 115: DropDownList1.DataSource = dw1;
Line: 113
Stack Trace:
[OracleException (0x80131938): ORA-01008: not all variables bound
]
System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +203
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1018
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25
System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) +142
System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
app.add1.addToExisting() in C:\Moi \app\add1.aspx.cs:113
app.add1.showchoise(Object sender, EventArgs e) in C:\Moi\ app.add1.aspx.cs:76
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +105
System.Web.UI.WebControls.RadioButtonList.RaisePostDataChangedEvent() +145
System.Web.UI.WebControls.RadioButtonList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +7
System.Web.UI.Page.RaiseChangedEvents() +137
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4778
what is wrong?
thank you
Probi
|
|
|
Gitesh |
| Posted: May 21, 2008 11:16:30 PM | |
|
Total Post: 322
Joined: May, 2005
|
You should need to post this problem in any other developer thread.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 333 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|