Aleks
asked on
I show part of this script if recordset is not empty
I have the following script (below). I want to show the value for rte.Txt IF the recordset "rs_lttmrg" is NOT EMPTY
--
// Create Editor instance and use Text property to load content into the RTE.
Dim rte
Set rte=new RichTextEditor
Show the value in this line below it recordset is not empty, otherwise value should be = ""
rte.Text=(rs_lttrmrg.Fields.Item("L trBody").V alue)
// Set a unique ID to Editor
rte.ID="editor1"
rte.Width="800px"
rte.Toolbar="bluedot"
rte.MvcInit()
// Render Editor
Response.Write(rte.GetStri ng())
---
How can I do this ?
--
// Create Editor instance and use Text property to load content into the RTE.
Dim rte
Set rte=new RichTextEditor
Show the value in this line below it recordset is not empty, otherwise value should be = ""
rte.Text=(rs_lttrmrg.Fields.Item("L
// Set a unique ID to Editor
rte.ID="editor1"
rte.Width="800px"
rte.Toolbar="bluedot"
rte.MvcInit()
// Render Editor
Response.Write(rte.GetStri
---
How can I do this ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem is NOT that the value of the field is "" or NULL, the problem is that the recordset is empty.
ASKER
This seem to work.
' Show the value in this line below it recordset is not empty, otherwise value should be = ""
rte.Text=""
If Not rs_lttrmrg.EOF Or Not rs_lttrmrg.BOF Then
rte.Text = rs_lttrmrg.Fields.Item("Lt rBody").Va lue
End If ' end Not rs_lttrmrg.EOF Or NOT rs_lttrmrg.BOF
' Show the value in this line below it recordset is not empty, otherwise value should be = ""
rte.Text=""
If Not rs_lttrmrg.EOF Or Not rs_lttrmrg.BOF Then
rte.Text = rs_lttrmrg.Fields.Item("Lt
End If ' end Not rs_lttrmrg.EOF Or NOT rs_lttrmrg.BOF
// Create Editor instance and use Text property to load content into the RTE.
Dim rte
Dim rte
Set rte=new RichTextEditor
' Show the value in this line below it recordset is not empty, otherwise value should be = ""
rte.Text=""
If False = rs_lttrmrg.EOF Then
If CStr(rs_lttrmrg.Fields.Item("LtrBody").Value) <> "" Then
rte.Text = rs_lttrmrg.Fields.Item("LtrBody").Value
End If
End If
ASKER
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/bluedot/Intranet/qnr/Inde
line 212 is: rte.Text=""
weird