Re: ACCESS memo fields in ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Hugh Welford (hugh.welford_at_btinternet.com)
Date: 05/21/04


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"
>
>



Relevant Pages

  • Re: Access Query w/VBScript
    ... > I am a VBA programmer learning ASP. ... > The code below is my attempt to access a database ... Here is how I would call your query (I assume ... Bob Barrows ...
    (microsoft.public.scripting.vbscript)
  • RE: SQL injection from within a table - is it possible?
    ... I would assume that all parsers would parse the /entire/ sql query ... Suppose your username was "bob", ... Going back to your initial question about a "stored" SQL Injection ... Is it possible to store an SQL injection string into a MSSQL database ...
    (Pen-Test)
  • Re: Update Application value on multiple servers?
    ... I have to agree with Aaron and Bob on this one even though I originally ... >> Why are you using poor database design as an excuse for poor application ... >> need to synchronize between all the servers in the farm. ... More often than not that particular query is the bottleneck in our ...
    (microsoft.public.inetserver.asp.general)
  • RE: SQL injection from within a table - is it possible?
    ... "bob" will be the value returned. ... Is it possible to store an SQL injection string into a MSSQL database table, so when the database performs an action like through a stored proc, the SQL injection attack takes place? ... Of course using the SQL query analyzer on the database table, ...
    (Pen-Test)
  • Re: Surrogate Keys: an Implementation Issue
    ... a database that must provide a complete audit trail of every change. ... The SSN is a surrogate that works most of the time. ... Unless the key is immutable, when Bob issues the update, ... by a logical identifier. ...
    (comp.databases.theory)