HI,
I have a DropDownList populated from database
I use the following code
OracleDataAdapter ad2 = new OracleDataAdapter(cmd2, connection);
DataSet ds2 = new DataSet();
ad2.Fill(ds2);
DataView dw2 = new DataView(ds2.Tables[0]);
DropDownList2.Visible=true;
DropDownList2.DataSource = dw2;
DropDownList2.DataBind();
for (int j = 0; j < DropDownList2.Items.Count; j++)
{
DropDownList2.Items[j].Text = iname[j];
DropDownList2.Items[j].Selected = false;
}
but I get this error :
Exception Details: System.Data.OracleClient.OracleException: ORA-01008: not all variables bound
Source Error:
Line 136: DataSet ds2 = new DataSet();
Line 137:
Line 138: ad2.Fill(ds2);
Line 139:
Line 140: DataView dw2 = new DataView(ds2.Tables[0]);
Source File: C:\Moj\Moi resenija\aplikacija\pmedit0.aspx.cs Line: 138
Stack Trace:
[OracleException (0x80131938): ORA-01008: not all variables bound
]
System.Data.OracleClient.OracleConnection.CheckErr or(OciErrorHandle errorHandle, Int32 rc) +203
System.Data.OracleClient.OracleCommand.Execute(Oci StatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1018
System.Data.OracleClient.OracleCommand.Execute(Oci StatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25
System.Data.OracleClient.OracleCommand.ExecuteRead er(CommandBehavior behavior) +142
System.Data.OracleClient.OracleCommand.ExecuteDbDa taReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(CommandBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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
aplikacija.pmedit0.project(Object sender, EventArgs e) in C:\Moj\Moi resenija\aplikacija\pmedit0.aspx.cs:138
System.Web.UI.WebControls.ListControl.OnSelectedIn dexChanged(EventArgs e) +105
System.Web.UI.WebControls.DropDownList.RaisePostDa taChangedEvent() +134
System.Web.UI.WebControls.DropDownList.System.Web. UI.IPostBackDataHandler.RaisePostDataChangedEvent( ) +7
System.Web.UI.Page.RaiseChangedEvents() +137
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4778
can someone tell me what is wrong?