Avatar billede guzzie Nybegynder
27. september 2001 - 15:08 Der er 1 løsning

asp upload problem

Hi there

I found this script on the nettet to upload either to the server or write to your database
I have a db table called pics, with 2 columes
called pics and pics_des

I can easliy use the scripts to upload to my server however I cant seem to get the the script to write to the db ??

the example script i found looks like this
            Set RS = Server.CreateObject(\"ADODB.Recordset\")
            RS.Open \"MyUploadTable\", \"CONNECT STRING OR ADO.Connection\", 2, 2
            RS.AddNew \' create a new record
           
            RS(\"filename\")    = File.FileName
            RS(\"filesize\")      = File.FileSize
            RS(\"contenttype\") = File.ContentType
       

            File.SaveToDatabase RS(\"filedata\")
           

            RS.Update
            RS.Close

I tried using a normal insert statement but that didnt do the job, is the example above the only correct way of updatng my database when uploading ?
(there are three images being uploaded)

does anyone have any good ideas or have a better idea
thanks
Guzzie
Avatar billede guzzie Nybegynder
28. september 2001 - 10:39 #1
hmmmmm closing question
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
Kurser inden for grundlæggende programmering

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