Server Side and Client Side
am 22.03.2006 10:45:30 von MarkS
I have developed an Application which opens an ADO Recordset on the Server
using the following :
Set adoConn=Server.CreateObject("ADODB.Connection")
adoConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;D ata
Source=c:\subsidy\subsidy.mdb"
The above works fine or I could use Server.Mappath etc. However how do I do
the same on the Client Side. I'm using CreateObject etc but I cannot use
c:\subsidy\subsidy.mdb to open as this would point to the Clients local hard
drive instead of the Server. What is the best practice for this.
Thank You
Re: Server Side and Client Side
am 22.03.2006 13:46:56 von reb01501
MarkS wrote:
> I have developed an Application which opens an ADO Recordset on the
> Server using the following :
>
> Set adoConn=Server.CreateObject("ADODB.Connection")
> adoConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;D ata
> Source=c:\subsidy\subsidy.mdb"
>
> The above works fine or I could use Server.Mappath etc. However how
> do I do the same on the Client Side. I'm using CreateObject etc but
> I cannot use c:\subsidy\subsidy.mdb to open as this would point to
> the Clients local hard drive instead of the Server. What is the best
> practice for this.
>
> Thank You
1. Since you are asking how to do something in the client, it is no longer
an ASP issue (ASP is server-side technology). A more appropriate newsgroup
would be .scripting.vbscript since you appear to want to contine using
vbscript in your client-side code. however, you should be aware that the use
of vbscript in client script will restrict clients to IE. You would be
better advised to learn to use javascript or jscript and post your questions
to .scripting.jscript.
2. Due to security reasons it may not be possible to directly open the
database from client-side code. I would suggest investigating the use of
XMLHTTP to allow client-side code to submit data directly to asp pages which
return data directly.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Server Side and Client Side
am 29.03.2006 06:50:07 von Hal Rosser
"MarkS" wrote in message
news:30F60162-6EA9-4388-A6EB-AF89FFB463CE@microsoft.com...
> I have developed an Application which opens an ADO Recordset on the Server
> using the following :
>
> Set adoConn=Server.CreateObject("ADODB.Connection")
> adoConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;D ata
> Source=c:\subsidy\subsidy.mdb"
>
> The above works fine or I could use Server.Mappath etc. However how do I
do
> the same on the Client Side. I'm using CreateObject etc but I cannot use
> c:\subsidy\subsidy.mdb to open as this would point to the Clients local
hard
> drive instead of the Server. What is the best practice for this.
>
The web page's client-side script cannnot access the client computer's file
system.