Hi,
In your database make sure that the "file"'s field is specified as text. you
can retrieve the value of the field either by
rsDC.Fields.Item("file").Value
or by
rsDC.Fields("file")
I'll rather use the top refrence.
To make the filename a link so that the can download it use the <a HREF><a>
tak and specify the source as the value of the specified file
(rsDC.Fields.Item("file").Value)
HTH.....!!
Thea
-----Original Message-----
From: Access ASP digest [mailto:access_asp@p...]
Sent: 07 December 2001 02:00
To: access_asp digest recipients
Subject: access_asp digest: December 06, 2001
-----------------------------------------------
When replying to the digest, please quote only
relevant material, and edit the subject line to
reflect the message you are replying to.
-----------------------------------------------
The URL for this list is:
http://p2p.wrox.com/list.asp?list=access_asp
ACCESS_ASP Digest for Thursday, December 06, 2001.
1. How can I display file names?
2. clearing forms record source
3. Re: clearing forms record source
4. how to insert a yes/no type value?
5. Could not lock file ??
----------------------------------------------------------------------
Subject: How can I display file names?
From: "Paul B" <lead_5@h...>
Date: Thu, 6 Dec 2001 01:40:22
X-Message-Number: 1
Hello,
I have an online database that I have used to contain files, and users
should be able to download them.
I know the code to display normal text, date etc.
rsDC.Fields("FileId")
But when I use the same for the field containing the files I get a type
mismatch error. Therefore I assume that
rsDC.Fields("File")
is the wrong coding.
Does anyone know the coding to just display the name of the file? I also
want to have the filenames as links so users can download the file, is
there any special coding for that?
Thank You
Regards
Paul
----------------------------------------------------------------------
Subject: clearing forms record source
From: "AAustin" <plant-tech@x...>
Date: Thu, 6 Dec 2001 18:01:23 +1300
X-Message-Number: 2
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C17E80.046D7340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
I have a form used to query the db depending on various where conditions
created from drop down boxes. Records are displayed as continuous forms.
I am looking for a tidy way to clear the forms record source and so
removing the record set, I currently do it by asking for a record I know
does not exist hence returning none but this necessitates a another trip
to server. What is the standard approach.
Thanks in reply
Andrew
----------------------------------------------------------------------
Subject: Re: clearing forms record source
From: "Ken Schaefer" <ken@a...>
Date: Thu, 6 Dec 2001 17:40:23 +1100
X-Message-Number: 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "AAustin" <plant-tech@x...>
Subject: [access_asp] clearing forms record source
: I have a form used to query the db depending on various
: where conditions created from drop down boxes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I understand this bit. You have a HTML form. The user selects various
criteria from the form. This information is used to retrieve some data from
a database and (presumably) write this data to the screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Records are displayed as continuous forms.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This I don't understand...are you still talking about HTML forms? What
exactly do you mean by the above?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I am looking for a tidy way to clear the forms record source
: and so removing the record set.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This I also don't understand. The "HTML form" doesn't have a record source.
You use code to preset the values of HTML elements. If you don't want the
form to have any value, just don't set a value in the first place.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I currently do it by asking for a record I know does not
: exist hence returning none but this necessitates a
: another trip to server. What is the standard approach.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Why not request the page without specifing a record at all? and just have
the code detect whether a RecordID (or search criteria ) where passed in. If
none were passed in, then just write out a blank HTML form.
Cheers
Ken
----------------------------------------------------------------------
Subject: how to insert a yes/no type value?
From: kfeng@m...
Date: Thu, 6 Dec 2001 17:41:58
X-Message-Number: 4
Hi, all:
This sees a simple question because its all about is yes or no. However, I
have truggled for days with it.
In my Access table I have a yes/no field. I am trying to insert a value
with an asp page. My problem is what do I states that value? I tried 1/0,
yes/no, true/false, with and without ', [], #... quoted, anyway, it does
not work. Does anybody have this experience before? I appreciate your help!
By the way, what if I am using Oracel, SQL server, I guess it will bug me
again.
kun
----------------------------------------------------------------------
Subject: Could not lock file ??
From: "majid" <yna54@o...>
Date: Thu, 6 Dec 2001 19:17:55
X-Message-Number: 5
hi, I am learning asp, I just downloaded an asp application called
uaportal, so all the files and the MS access database are in a directory
called uaportal :
E:\INETPUB\WWWROOT\majid\uaportal\
One of those files is Common.asp :
...............
Line 19: Dim strConn, strLogin, strPassword
Line20: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& "E:\INETPUB\WWWROOT\majid\uaportal\ua_portal.mdb" & ";Persist Security
Info=False"
Line21: strLogin = "Admin"
Line22: strPassword = ""
'-------------------------------
' Open the connection
'-------------------------------
Line26: cn.open strConn, strLogin, strPassword
But when I go to the browser :
http://155.108.117.153/majid/uaportal/
I got this error :
Microsoft JET Database Engine error '80004005'
Could not lock file.
/majid/uaportal/Common.asp, line 26
Could you please help
thanks
---
END OF DIGEST