how to get a jpg file into access?

how to get a jpg file into access?

am 19.10.2005 20:03:04 von Kevin

Hi,

I made a form in order to collect data from new students, like name, address
etc ... but i also ask a picture in jpg format.
My problem is: how to get the jpg fiel into MS Access? I tried with an OLE
field (field foto) but i t doesn't work a,d with a text field, but the i get
only the path of the file.
Here is my code:






test.asp:

<%
dat=request.form("test")
set objdc = Server.CreateObject("ADODB.Connection")
objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
=d:\access\newres.mdb")
strsql="INSERT INTO test (foto,logon) values('" & dat & "','bibi' )"
objdc.execute strsql, , adcmdtext and adcmdexecutenorecords
%>

Thanks
Kevin

Re: how to get a jpg file into access?

am 19.10.2005 20:09:22 von Steven Burn

Best answer = DON'T!!!!

Store the file on the webserver and the PATH to the file in the database!.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Kevin" wrote in message
news:O6QuYdN1FHA.4064@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I made a form in order to collect data from new students, like name,
address
> etc ... but i also ask a picture in jpg format.
> My problem is: how to get the jpg fiel into MS Access? I tried with an OLE
> field (field foto) but i t doesn't work a,d with a text field, but the i
get
> only the path of the file.
> Here is my code:
>


>
>
>

>
> test.asp:
>
> <%
> dat=request.form("test")
> set objdc = Server.CreateObject("ADODB.Connection")
> objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
> =d:\access\newres.mdb")
> strsql="INSERT INTO test (foto,logon) values('" & dat & "','bibi' )"
> objdc.execute strsql, , adcmdtext and adcmdexecutenorecords
> %>
>
> Thanks
> Kevin
>
>

Re: how to get a jpg file into access?

am 19.10.2005 20:48:26 von Kevin

Thanks for replying.

But how can i store the file on the webserver? Is the use of an input with
type 'File' correct?
....


"Steven Burn" wrote in message
news:ORLt8gN1FHA.3188@TK2MSFTNGP14.phx.gbl...
> Best answer = DON'T!!!!
>
> Store the file on the webserver and the PATH to the file in the database!.
>
> --
> Regards
>
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>
> Keeping it FREE!
>
> "Kevin" wrote in message
> news:O6QuYdN1FHA.4064@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I made a form in order to collect data from new students, like name,
> address
> > etc ... but i also ask a picture in jpg format.
> > My problem is: how to get the jpg fiel into MS Access? I tried with an
OLE
> > field (field foto) but i t doesn't work a,d with a text field, but the i
> get
> > only the path of the file.
> > Here is my code:
> >


> >
> >
> >

> >
> > test.asp:
> >
> > <%
> > dat=request.form("test")
> > set objdc = Server.CreateObject("ADODB.Connection")
> > objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
> > =d:\access\newres.mdb")
> > strsql="INSERT INTO test (foto,logon) values('" & dat & "','bibi' )"
> > objdc.execute strsql, , adcmdtext and adcmdexecutenorecords
> > %>
> >
> > Thanks
> > Kevin
> >
> >
>
>

Re: how to get a jpg file into access?

am 19.10.2005 20:53:19 von Steven Burn

Yes it is..... as for sticking the file onto the server, you'll need to
upload it;

http://aspfaq.com/show.asp?id=2189

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Kevin" wrote in message
news:O2A4u2N1FHA.4064@TK2MSFTNGP09.phx.gbl...
> Thanks for replying.
>
> But how can i store the file on the webserver? Is the use of an input with
> type 'File' correct?
> ...
>
>
> "Steven Burn" wrote in message
> news:ORLt8gN1FHA.3188@TK2MSFTNGP14.phx.gbl...
> > Best answer = DON'T!!!!
> >
> > Store the file on the webserver and the PATH to the file in the
database!.
> >
> > --
> > Regards
> >
> > Steven Burn
> > Ur I.T. Mate Group
> > www.it-mate.co.uk
> >
> > Keeping it FREE!
> >
> > "Kevin" wrote in message
> > news:O6QuYdN1FHA.4064@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > >
> > > I made a form in order to collect data from new students, like name,
> > address
> > > etc ... but i also ask a picture in jpg format.
> > > My problem is: how to get the jpg fiel into MS Access? I tried with an
> OLE
> > > field (field foto) but i t doesn't work a,d with a text field, but the
i
> > get
> > > only the path of the file.
> > > Here is my code:
> > >


> > >
> > >
> > >

> > >
> > > test.asp:
> > >
> > > <%
> > > dat=request.form("test")
> > > set objdc = Server.CreateObject("ADODB.Connection")
> > > objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
> > > =d:\access\newres.mdb")
> > > strsql="INSERT INTO test (foto,logon) values('" & dat & "','bibi' )"
> > > objdc.execute strsql, , adcmdtext and adcmdexecutenorecords
> > > %>
> > >
> > > Thanks
> > > Kevin
> > >
> > >
> >
> >
>
>

Re: how to get a jpg file into access?

am 19.10.2005 21:15:50 von Kevin

thanks

"Steven Burn" wrote in message
news:OBrUg5N1FHA.3180@TK2MSFTNGP14.phx.gbl...
> Yes it is..... as for sticking the file onto the server, you'll need to
> upload it;
>
> http://aspfaq.com/show.asp?id=2189
>
> --
> Regards
>
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>
> Keeping it FREE!
>
> "Kevin" wrote in message
> news:O2A4u2N1FHA.4064@TK2MSFTNGP09.phx.gbl...
> > Thanks for replying.
> >
> > But how can i store the file on the webserver? Is the use of an input
with
> > type 'File' correct?
> > ...
> >
> >
> > "Steven Burn" wrote in message
> > news:ORLt8gN1FHA.3188@TK2MSFTNGP14.phx.gbl...
> > > Best answer = DON'T!!!!
> > >
> > > Store the file on the webserver and the PATH to the file in the
> database!.
> > >
> > > --
> > > Regards
> > >
> > > Steven Burn
> > > Ur I.T. Mate Group
> > > www.it-mate.co.uk
> > >
> > > Keeping it FREE!
> > >
> > > "Kevin" wrote in message
> > > news:O6QuYdN1FHA.4064@TK2MSFTNGP09.phx.gbl...
> > > > Hi,
> > > >
> > > > I made a form in order to collect data from new students, like name,
> > > address
> > > > etc ... but i also ask a picture in jpg format.
> > > > My problem is: how to get the jpg fiel into MS Access? I tried with
an
> > OLE
> > > > field (field foto) but i t doesn't work a,d with a text field, but
the
> i
> > > get
> > > > only the path of the file.
> > > > Here is my code:
> > > >


> > > >
> > > >
> > > >

> > > >
> > > > test.asp:
> > > >
> > > > <%
> > > > dat=request.form("test")
> > > > set objdc = Server.CreateObject("ADODB.Connection")
> > > > objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
> > > > =d:\access\newres.mdb")
> > > > strsql="INSERT INTO test (foto,logon) values('" & dat & "','bibi' )"
> > > > objdc.execute strsql, , adcmdtext and adcmdexecutenorecords
> > > > %>
> > > >
> > > > Thanks
> > > > Kevin
> > > >
> > > >
> > >
> > >
> >
> >
>
>