Problem returning data from a scroll text box to an Access memo field 
Author Message
 Problem returning data from a scroll text box to an Access memo field

Hello,

I have set up a form with various objects including radio buttons, check
boxes, one line text boxes and scrolling text boxes. I am using some script
to process the form to populate an Access database.

All data comes through except for the scrolling text box data.

It appears as though anything after a hard return is not recognised. If I
write the variable to an ASP page, all the data is being stored OK in the
variable. If I process this to the database, only the first line, up until
the hard return is stored.

If anyone can help, I would be most appreciative.

Regards

Denis Ward

My code looks as follows :

   <SCRIPT LANGUAGE=VBScript RUNAT=Server>

 Dim cn 'Connection var
 Dim rs 'Recordset var
 Dim SQL

 Set cn = Server.CreateObject("ADODB.Connection")
 Set rs = Server.CreateObject("ADODB.Recordset")

 Session("Q1dVar") = Request.Form("Q1d") ' this is on another page.

 cn.Open "DNSname"

 SQL = "Select * From tblSurvey Where FirstName = 'xxxyzxc'"
 rs.Open SQL,cn,1,2
 rs.AddNew
 rs("FirstName") = Session("FirstNameVar")
 rs("Q1d") = Session("Q1dVar") ' this is the variable passing the data from
the scrolling text box named Q1d
 rs.Update

 rs.close
 Set rs = Nothing
 cn.close
 Set cn = Nothing
</SCRIPT>



Mon, 17 Mar 2003 15:36:47 GMT  
 Problem returning data from a scroll text box to an Access memo field
Do you have the Q1D field set to memo in the DB?

Quote:

> Hello,

> I have set up a form with various objects including radio buttons, check
> boxes, one line text boxes and scrolling text boxes. I am using some
script
> to process the form to populate an Access database.

> All data comes through except for the scrolling text box data.

> It appears as though anything after a hard return is not recognised. If I
> write the variable to an ASP page, all the data is being stored OK in the
> variable. If I process this to the database, only the first line, up until
> the hard return is stored.

> If anyone can help, I would be most appreciative.

> Regards

> Denis Ward

> My code looks as follows :

>    <SCRIPT LANGUAGE=vbscript RUNAT=Server>

>  Dim cn 'Connection var
>  Dim rs 'Recordset var
>  Dim SQL

>  Set cn = Server.CreateObject("ADODB.Connection")
>  Set rs = Server.CreateObject("ADODB.Recordset")

>  Session("Q1dVar") = Request.Form("Q1d") ' this is on another page.

>  cn.Open "DNSname"

>  SQL = "Select * From tblSurvey Where FirstName = 'xxxyzxc'"
>  rs.Open SQL,cn,1,2
>  rs.AddNew
>  rs("FirstName") = Session("FirstNameVar")
>  rs("Q1d") = Session("Q1dVar") ' this is the variable passing the data
from
> the scrolling text box named Q1d
>  rs.Update

>  rs.close
>  Set rs = Nothing
>  cn.close
>  Set cn = Nothing
> </SCRIPT>



Mon, 17 Mar 2003 03:00:00 GMT  
 Problem returning data from a scroll text box to an Access memo field

Denis,

I bet all of your data is in the database.  Try retrieving it and
displaying it on a page.

Marvin Thompson

Quote:

> Jimbo,

> Yes the field in the DB is set to memo.

> It does appear that the problem is the line feed. I used a replace statement
> that I found under the solution to someone else's problem in the newsgroup
> to remove to the line feed.

> Session("Q1dVar") = Replace(Session("Q1dVar"),vbCrlf," - ")

> Thanks for your help.

> Denis



> > Do you have the Q1D field set to memo in the DB?


> > > Hello,

> > > I have set up a form with various objects including radio buttons, check
> > > boxes, one line text boxes and scrolling text boxes. I am using some
> > script
> > > to process the form to populate an Access database.

> > > All data comes through except for the scrolling text box data.

> > > It appears as though anything after a hard return is not recognised. If
> I
> > > write the variable to an ASP page, all the data is being stored OK in
> the
> > > variable. If I process this to the database, only the first line, up
> until
> > > the hard return is stored.

> > > If anyone can help, I would be most appreciative.

> > > Regards

> > > Denis Ward

> > > My code looks as follows :

> > >    <SCRIPT LANGUAGE=vbscript RUNAT=Server>

> > >  Dim cn 'Connection var
> > >  Dim rs 'Recordset var
> > >  Dim SQL

> > >  Set cn = Server.CreateObject("ADODB.Connection")
> > >  Set rs = Server.CreateObject("ADODB.Recordset")

> > >  Session("Q1dVar") = Request.Form("Q1d") ' this is on another page.

> > >  cn.Open "DNSname"

> > >  SQL = "Select * From tblSurvey Where FirstName = 'xxxyzxc'"
> > >  rs.Open SQL,cn,1,2
> > >  rs.AddNew
> > >  rs("FirstName") = Session("FirstNameVar")
> > >  rs("Q1d") = Session("Q1dVar") ' this is the variable passing the data
> > from
> > > the scrolling text box named Q1d
> > >  rs.Update

> > >  rs.close
> > >  Set rs = Nothing
> > >  cn.close
> > >  Set cn = Nothing
> > > </SCRIPT>



Mon, 17 Mar 2003 03:00:00 GMT  
 Problem returning data from a scroll text box to an Access memo field

Jimbo,

Yes the field in the DB is set to memo.

It does appear that the problem is the line feed. I used a replace statement
that I found under the solution to someone else's problem in the newsgroup
to remove to the line feed.

Session("Q1dVar") = Replace(Session("Q1dVar"),vbCrlf," - ")

Thanks for your help.

Denis


Quote:
> Do you have the Q1D field set to memo in the DB?


> > Hello,

> > I have set up a form with various objects including radio buttons, check
> > boxes, one line text boxes and scrolling text boxes. I am using some
> script
> > to process the form to populate an Access database.

> > All data comes through except for the scrolling text box data.

> > It appears as though anything after a hard return is not recognised. If
I
> > write the variable to an ASP page, all the data is being stored OK in
the
> > variable. If I process this to the database, only the first line, up
until
> > the hard return is stored.

> > If anyone can help, I would be most appreciative.

> > Regards

> > Denis Ward

> > My code looks as follows :

> >    <SCRIPT LANGUAGE=vbscript RUNAT=Server>

> >  Dim cn 'Connection var
> >  Dim rs 'Recordset var
> >  Dim SQL

> >  Set cn = Server.CreateObject("ADODB.Connection")
> >  Set rs = Server.CreateObject("ADODB.Recordset")

> >  Session("Q1dVar") = Request.Form("Q1d") ' this is on another page.

> >  cn.Open "DNSname"

> >  SQL = "Select * From tblSurvey Where FirstName = 'xxxyzxc'"
> >  rs.Open SQL,cn,1,2
> >  rs.AddNew
> >  rs("FirstName") = Session("FirstNameVar")
> >  rs("Q1d") = Session("Q1dVar") ' this is the variable passing the data
> from
> > the scrolling text box named Q1d
> >  rs.Update

> >  rs.close
> >  Set rs = Nothing
> >  cn.close
> >  Set cn = Nothing
> > </SCRIPT>



Tue, 18 Mar 2003 11:44:30 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem reading data from memo field (Access)

2. problems using memo fields and rich text boxes

3. Memo fields - problems reporting 2 memo fields

4. Entering vast amont of text into memo-field of access-database (on server)

5. Format Text Stored in Access Memo Fields

6. ASP page won't display text from MS Access Memo field

7. Text Boxes And Memo Fields

8. Leaking Text Box for MEMO fields ?

9. Text or Memo fields refuse to accept data

10. SQL Searching For Text in Memo Fields with Binary Data Included

11. Problem with Access: memo fields

12. Problems with Memo fields in Access

 

 
Powered by phpBB® Forum Software