22. april 2003 - 10:10Der 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?
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
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.
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
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.
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.
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.
>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.
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?
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
and I DO want to see your solution (OR admin will be on your tail) :o)
Synes godt om
Ny brugerNybegynder
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.