You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Marcel <ma...@st.hanze.nl> on 2001/06/07 12:57:56 UTC

Need info about odbc database handling in asp

Hello,

I've setup apache with asp. Works great! 
Now i want to access a odbc database within my asp.

I guess this should be done in perl, but can it be done in jscript too?
I would like to make a perl based script, and a jscript.

Can someone point me to a simple example? 

Thanks!

Re: Need info about odbc database handling in asp

Posted by Dariusz Pietrzak <da...@ajax.umcs.lublin.pl>.
> I've setup apache with asp. Works great! 
> Now i want to access a odbc database within my asp.

> I guess this should be done in perl, but can it be done in jscript too?
> I would like to make a perl based script, and a jscript.
You want your client's browser to connect to your dbase and not your
application?
That's a contradiction to 'Now i want to access a odbc database within my
asp'.

with perl you do sth like this:

<%
#my $DSN = 'driver=Microsoft Access Driver
#(*.mdb);dbq=C:\\path\\to\\mdb-file.mdb';
my $DSN = 'driver={SQL Server};Server=MSSQLServer1;
       database=mydatabase;uid=myid;pwd=mypass;';
my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') 
                        or die "$DBI::errstr\n";

#and then standart..
$dbh->do(" update users set money = null");

%>

Source generally starts looking realy ugly when you mix asp with
javascript ( duh, when I recall how our code used to look like when we
wrote in javascript server side, mixed with standart js uaa ).
 And also javascript is not a fully functional language, I found then most
setup that tried to do sth like that end with java applet running on
clients browser. seriously consider that solution since AFAIK js has many
pitas and eats developer time.



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Need info about odbc database handling in asp

Posted by Philip Mak <pm...@aaanime.net>.
On Thu, 7 Jun 2001, Marcel wrote:

> I guess this should be done in perl, but can it be done in jscript too?
> I would like to make a perl based script, and a jscript.

Apache::ASP only supports perl, not Jscript.

If you want to run Jscript with ASP on Apache, you need other software
such as Chilisoft ASP (not free).

I don't know much about ODBC; I always use DBI with MySQL.

-Philip Mak (pmak@aaanime.net)



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org