Re: ACCESS memo fields in ASP
From: Hugh Welford (hugh.welford_at_btinternet.com)
Date: 05/21/04
- Next message: Hugh Welford: "retrieving formatted messages from an ACCESS memo field."
- Previous message: Aaron Bertrand - MVP: "Re: ACCESS memo fields in ASP"
- In reply to: Bob Barrows [MVP]: "Re: ACCESS memo fields in ASP"
- Next in thread: Aaron Bertrand - MVP: "Re: ACCESS memo fields in ASP"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 May 2004 14:32:56 +0100
Hi Bob - thanks for your help. I explicitly named the required field as
suggested and also removed the "DISTINCT" operator from the sql statement
and all is well now.
Regards Hugh
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%234DTJvyPEHA.1620@TK2MSFTNGP12.phx.gbl...
> Hugh Welford wrote:
> > Hi ... using WIN XP/ FP 2000/ IIS.
> >
> > I need to be able to retieve variable length (>255 characters)
> > messages which have been saved in a memo field in an access data base
> > on the server. I am using the following code to test this : -
> >
> > <%
> > set objconn = server.createobject ("ADODB.connection")
> > set objrec = server.createobject ("ADODB.recordset")
> > objconn.open "DSN=daters"
>
> I would switch to the native Jet OLEDB provider instead of ODBC. Here is a
> sample connection string:
>
> objconn.open "Provider=microsoft.Jet.oledb.4.0;" & _
> "Data Source=p:\ath\to\database.mdb"
>
> If your database is password protected, or uses workgroup security, see
> www.able-consulting.com/ado_conn.htm for the syntax to use in each of
these
> cases. See http://www.aspfaq.com/show.asp?id=2168 if your Access database
is
> on a remote server.
>
> > strsql = "SELECT DISTINCT messages.* FROM messages WHERE messid = 305
> > ;"
>
> You should explicitly name the fields to be returned by your query.
Reserve
> selstar (select *) for one-off ad hoc queries. Using selstar impairs
> performance due to the need for ADO to make an extra trip to the database
to
> get the actual names of the fields being retruned by the query. In
addition,
> it often results in data being retrieved from the database that is not
> needed.
>
> HTH,
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
- Next message: Hugh Welford: "retrieving formatted messages from an ACCESS memo field."
- Previous message: Aaron Bertrand - MVP: "Re: ACCESS memo fields in ASP"
- In reply to: Bob Barrows [MVP]: "Re: ACCESS memo fields in ASP"
- Next in thread: Aaron Bertrand - MVP: "Re: ACCESS memo fields in ASP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|