Avatar billede boris Mester
22. april 2003 - 10:10 Der er 17 kommentarer og
1 løsning

PDF-filer

Hvordan kan man bedst gemme pdf filer i en Access database (både med Access brugeroverflade og med ASP) og vise dem ved hjælp af Access/ASP?
Eller skal man bruge f.eks. MySQL for at det kan lade sig gøre?
Avatar billede terry Ekspert
22. april 2003 - 11:58 #1
Doesnt matter if you use Access or MySQL I would NOT "gemme" files in the dB. Its best to save only the path and file name.Then In Access or ASP you just have to open the file using the specific program. How you do this in ASP I wouldnt know but in Access you can use ShellExec, I'll post an example later.
Avatar billede terry Ekspert
22. april 2003 - 12:08 #2
NOTE:To show PDF files in Access you need to have Acrobat reader or something installed on the PC!

Copy this code to a module:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


Public Const SW_HIDE = 0
Public Const SW_SHOW = 5

and this for example to the on click event to a button. txtWordDoc is the name of a field containing the document name.

Private Sub cmdOpenDoc_Click()
Dim stAppName As String
Dim result As Integer

    On Error GoTo Err_cmdOpenDoc_Click

    result = ShellExecute(0, "Open", Me.txtWordDoc, "", "", SW_SHOW)

    If result < 32 Then
        MsgBox "Couldn't open file ..."
    End If
   
Exit_cmdOpenDoc_Click:
    Exit Sub

Err_cmdOpenDoc_Click:
    MsgBox Err.Description
    Resume Exit_cmdOpenDoc_Click
   
End Sub
Avatar billede terry Ekspert
22. april 2003 - 20:41 #3
and?
Avatar billede terry Ekspert
23. april 2003 - 13:12 #4
boris>hows it going here? cant help if you dont make any comments!
Avatar billede terry Ekspert
26. april 2003 - 10:13 #5
boris!
Avatar billede terry Ekspert
29. april 2003 - 19:17 #6
boris if you cant answer soon then admin will be after you !
Avatar billede boris Mester
29. april 2003 - 22:29 #7
Hej igen. Rolig!
Tak for svaret, men jeg kan ikke se, at jeg kan bruge det i ASP sammenhæng på den webserver, jeg har adgang til.
I mellemtiden har jeg fundet en anden løsning, som viser pdf-filerne ved hjælp af ASP men skjuler dem for folk, der ikke har adgang.
Avatar billede terry Ekspert
30. april 2003 - 18:27 #8
QUESTION:>
(både med Access brugeroverflade og med ASP) og vise dem ved hjælp af Access/ASP?
ANSWER:> ..To show PDF files in Access ....

This category is Access so I can only help you with the Access part and thats what I have done. If you need help in ASP then yu need to place a question there also.
Avatar billede terry Ekspert
01. maj 2003 - 19:48 #9
what are we waiting for?
Avatar billede terry Ekspert
05. maj 2003 - 21:39 #10
boris>You have until tomorrow, then your time is up!
Avatar billede boris Mester
06. maj 2003 - 06:03 #11
Jeg beklager at sige, at svaret ikke har hjulpet mig.
I spm skrev jeg bl.a.: både med Access brugeroverflade og med ASP) og vise dem ved hjælp af Access/ASP?
Så uanset om kategorien hed Access eller ASP omfatter spm begge dele. Og et spm kan ikke have to kategorier.
Beklager svartiden.
Avatar billede boris Mester
06. maj 2003 - 06:03 #12
Da jeg i mellemtiden selv har fundet en brugbar løsning afsluttes spm.
Avatar billede terry Ekspert
06. maj 2003 - 19:12 #13
boris, that doesnt go, but I'll lot you off the hook this time, next time you will get admin on your tail.
But DO NOT expect help in future :o)
Avatar billede terry Ekspert
06. maj 2003 - 19:13 #14
boris>you COULD have placed two questions, one for ASP and one for Access
Avatar billede boris Mester
07. maj 2003 - 20:56 #15
>Terry. Jeg synes din optræden er uacceptabel og har derfor selv henvendt mig til Eksperten, da jeg ikke vil acceptere at du truer mig gentagne gange med at admin kommer efter mig, fordi du ikke får point.
Jeg har vitterligt ikke kunnet bruge dit svar til noget, uanset hvor godt eller hvor velment det var, og som jeg har fortalt selv fundet en løsning.
Hvis din tone havde været anderledes, havde du fået nogle points for indsatsen alligevel.
Dit forslag om at jeg skulle oprette to spm om samme emne er en opfordring til at bryde Ekspertens regler.
Avatar billede terry Ekspert
07. maj 2003 - 21:18 #16
boris>Its sound as though YOU are threatening me now! First I dont think my behavour has been oput of place all, on the contrary, i think yours has!

If you look closely at the dates and time of the comments and answers YOU will see that it took 7 days and some threats from my side to get YOU to place a comment! If I hadnt then we might still be waiting. It isnt a question of 30 points, I have enough of them thanks :o), it is a question of principles. There are over 600 unanswered question in this category and it is people like you how get an answer and cant be botherd to reward the people who use their time and knowledge to help others.
Furthermore, IF you have found a solution, then it is also required that YOU place it here for all to see (that you are not cheating).
I  very much doubt that eksperten will agree that the question placed is only ONE question. You have TWO problems one concerns ASP and one (although similar) concerns Access. The solutions WILL be different and therefore TWO answers to TWO questions would be in order. That I am 99.99% sure that eksperten would agree on.
HOW do you expect a person with almost no knowledge of ASP to answer that part of the question?
Avatar billede terry Ekspert
07. maj 2003 - 21:22 #17
LOOK at this comment >23/04-2003 13:12:19
LOOK at this comment >29/04-2003 19:17:55 (six days later) but it didn take long for you to react did it? 06/05-2003 06:03:17
Avatar billede terry Ekspert
07. maj 2003 - 21:25 #18
and I DO want to see your solution (OR admin will be on your tail) :o)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester