M
Miguel Dias Moura
Hello,
i have an ASP.net / VB page which i want to display 1 record of a database
acording to this:
1. The page receives a variable name "Explicador" in the URL. Example:
"Explicador = Jonh Smith"
2. The database where the records are is named "explicador"
3. Two of the database fields are "NomePrimeiro" and "NomeUltimo". The
"Explicador" field is created as follows:
"Explicador" = "NomePrimeiro" + " " + "NomeUltimo"
The SQL code i am using is this:
SELECT *, NomePrimeiro + ' ' + NomeUltimo as Explicador
FROM explicador
WHERE Explicador = ?
<Parameter Name="@Explicador" Value='<%#
IIf((Request.QueryString("Explicador") <> Nothing),
Request.QueryString("Explicador"), "") %>' Type="WChar"
/></Parameters></MM
ataSet>
Can you tell me what am i doing wrong?
Basicly when the URL has Explicador = John Smith, it should be loaded the
record that has NomePrimeiro = "John" and NomeUltimo = "Smith"
I am getting this error:
System.Data.OleDb.OleDbException: No value given for one or more required
parameters.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandB
ehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
Thank You,
Miguel
i have an ASP.net / VB page which i want to display 1 record of a database
acording to this:
1. The page receives a variable name "Explicador" in the URL. Example:
"Explicador = Jonh Smith"
2. The database where the records are is named "explicador"
3. Two of the database fields are "NomePrimeiro" and "NomeUltimo". The
"Explicador" field is created as follows:
"Explicador" = "NomePrimeiro" + " " + "NomeUltimo"
The SQL code i am using is this:
SELECT *, NomePrimeiro + ' ' + NomeUltimo as Explicador
FROM explicador
WHERE Explicador = ?
<Parameter Name="@Explicador" Value='<%#
IIf((Request.QueryString("Explicador") <> Nothing),
Request.QueryString("Explicador"), "") %>' Type="WChar"
/></Parameters></MM

Can you tell me what am i doing wrong?
Basicly when the URL has Explicador = John Smith, it should be loaded the
record that has NomePrimeiro = "John" and NomeUltimo = "Smith"
I am getting this error:
System.Data.OleDb.OleDbException: No value given for one or more required
parameters.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandB
ehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
Thank You,
Miguel